コード例 #1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         Debug.Log("Set boom instance.");
     }
 }
コード例 #2
0
 private void _timer_Elapsed(object sender, ElapsedEventArgs e)
 {
     if (!STOP)
     {
         Vector2 v = new Vector2((Target.X - Owner.X) / Map.EntityPixelPerCase, (Target.Y - Owner.Y) / Map.EntityPixelPerCase);
         EntityManager.Instance.Joueur.DealDamage((int)(70 / v.Length()));
         BOOM?.Invoke(this, e);
     }
 }
コード例 #3
0
 public void DoNuke()
 {
     Debug.Log("Starting nuke routine");
     if (missile == null)
     {
         Debug.LogError("Nuke null?");
     }
     if (gameObject.transform == null)
     {
         Debug.LogError("gameObject transform null.");
     }
     if (BOOM.instance == null)
     {
         _ = new BOOM();
         if (BOOM.instance == null)
         {
             Debug.LogError("Instance not working lmao.");
         }
     }
     BOOM.instance.DoExplode(gameObject.transform);
 }