private void Awake() { if (instance == null) { instance = this; Debug.Log("Set boom instance."); } }
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); } }
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); }