1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using UnityEngine;
- using System.Collections;
- public class CrystalBase : MapBase, IOccupier {
- public int powerLevel;
- public int maxPowerLevel = 5;
- public bool occupied;
- public float range = 4f;
- public bool running = false;
- public bool overwhelming;
- private TeamSideBarContainer teamSideBar;
- public Animator animator;
- private Station station;
- // private float radius = 2.2f;
- private void initTeamSideBar()
- {
- GameObject teamSideBarPrefab = Resources.Load(Config.TEAM_SIDE_BAR_PREFAB) as GameObject;
- GameObject teamSideBarObj = Instantiate(teamSideBarPrefab) as GameObject;
- teamSideBar = teamSideBarObj.GetComponent<TeamSideBarContainer>();
- teamSideBar.setCrystal(this);
- }
- public TeamSideBarContainer getTeamSideBar()
- {
- return teamSideBar;
- }
- public void SetStation(Station station)
- {
- this.station = station;
- if(this.station != null)
- {
- this.station.crystalBase = this;
- this.station.overwhelming = overwhelming;
- }
- }
- public Station GetStation()
- {
- return station;
- }
- private int _occupyPriority;
- public int occupyPriority
- {
- get{
- return _occupyPriority;
- }
- set{
- _occupyPriority = value;
- }
- }
- }
|