public override void Enter() { base.Enter(); ecosystem = Ecosystem.Instance; // TODO: ステータスの差し替えにする // owner.Tribe.Name = "Boss"; // owner.gameObject.name = "Boss"; // owner.Tribe.Speed *= 0.75f; }
private void OnCollisionEnter(Collision collision) { if (collision.gameObject.tag == "Cell") { var cell = collision.gameObject.GetComponent <Cell>(); if ("Boss" != cell.Tribe.Name) { Destroy(gameObject.GetComponent <Collider>()); if (cell) { Ecosystem.GenerateTribe(cell); } DestoryAtom(); } } }
public override void Execute() { base.Execute(); if (ElapsedTimeSinseStateStart < owner.Tribe.Physical.DestroyDelayTime) { if (owner.IsLeader) { // If there is a survival other than myself, inherit the post to that cell. if (Ecosystem.DetectTribe(owner.Tribe.Name).Any(cell => !cell.IsPlayer)) { owner.DecideNextLeader(); } else { Ecosystem.Extinction(owner.Tribe); } } var obj = Resources.Load("Explosion") as GameObject; UnityEngine.Object.Destroy(GameObject.Instantiate(obj, owner.transform.position, Quaternion.identity), 1f); UnityEngine.Object.Destroy(owner.gameObject); } }
private void Awake() { ecosystem = Ecosystem.Instance; button.interactable = false; }