Beispiel #1
0
 bool ReflectorShotCB(ActionReq ar)
 {
     if (ar.a == pAction.fireReflected)             // so there's no looping, just blow this up if we're hit with a reflected shot
     {
         this.DestroyCell(true);
     }
     else
     {
         this.vis       = true;
         this.reflected = true;                 // mark as reflected so that UI can display the difference to owner
         Vector2 loc = new Vector2(Random.Range(0, this.pb.sizex - 1), Random.Range(0, this.pb.sizey - 1));
         //Debug.Log("Ping! Deflected that shot : " + this.reflected.ToString());
         pb.CellApplyActionReqs(new List <ActionReq> {
             new ActionReq(ar.t, ar.p, pAction.fireReflected, new Vector2[] { loc })
         });
     }
     return(true);
 }