CrystalBase.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using UnityEngine;
  2. using System.Collections;
  3. public class CrystalBase : MapBase, IOccupier {
  4. public int powerLevel;
  5. public int maxPowerLevel = 5;
  6. public bool occupied;
  7. public float range = 4f;
  8. public bool running = false;
  9. public bool overwhelming;
  10. private TeamSideBarContainer teamSideBar;
  11. public Animator animator;
  12. private Station station;
  13. // private float radius = 2.2f;
  14. private void initTeamSideBar()
  15. {
  16. GameObject teamSideBarPrefab = Resources.Load(Config.TEAM_SIDE_BAR_PREFAB) as GameObject;
  17. GameObject teamSideBarObj = Instantiate(teamSideBarPrefab) as GameObject;
  18. teamSideBar = teamSideBarObj.GetComponent<TeamSideBarContainer>();
  19. teamSideBar.setCrystal(this);
  20. }
  21. public TeamSideBarContainer getTeamSideBar()
  22. {
  23. return teamSideBar;
  24. }
  25. public void SetStation(Station station)
  26. {
  27. this.station = station;
  28. if(this.station != null)
  29. {
  30. this.station.crystalBase = this;
  31. this.station.overwhelming = overwhelming;
  32. }
  33. }
  34. public Station GetStation()
  35. {
  36. return station;
  37. }
  38. private int _occupyPriority;
  39. public int occupyPriority
  40. {
  41. get{
  42. return _occupyPriority;
  43. }
  44. set{
  45. _occupyPriority = value;
  46. }
  47. }
  48. }