Example #1
0
    public void OnHit()
    {
        WallParent parent = GetComponentInParent <WallParent>();

        parent.DisableKinematicsAllBlock();
        parent.Crashed = true;

        GameObject detonator = (GameObject)Instantiate(DetonatorPrefab);

        detonator.transform.position = this.transform.position;

        detonator.transform.parent = GameObject.FindWithTag(Tags.DetonatorParent).transform;
    }
Example #2
0
 void Awake()
 {
     gameController = GameObject.FindWithTag(Tags.GameController).GetComponent <GameController>();
     wall           = GetComponent <WallParent>();
 }