Exemplo n.º 1
0
 public override void Enter()
 {
     base.Enter();
     ecosystem = Ecosystem.Instance;
     // TODO: ステータスの差し替えにする
     //    owner.Tribe.Name = "Boss";
     //    owner.gameObject.name = "Boss";
     //    owner.Tribe.Speed *= 0.75f;
 }
Exemplo n.º 2
0
 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();
         }
     }
 }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
        private void Awake()
        {
            ecosystem = Ecosystem.Instance;

            button.interactable = false;
        }