Beispiel #1
0
    // Start is called before the first frame update
    private void Awake()
    {
        theWalls           = new GameObject[transform.childCount];
        _wallManagerScript = GameObject.FindWithTag("WallController").GetComponent <WallManager>();
        _thisWallChange    = GetComponent <WallChange>();

        for (int i = 0; i < theWalls.Length; i++)
        {
            theWalls[i] = transform.GetChild(i).gameObject;
        }
    }
Beispiel #2
0
    public void IAmConnectedIMustConnect()
    {
        if (_isConnected)
        {
            _connectedWall = _wallManagerScript.SetConnectedWall(gameObject);
        }

        if (_connectedWall != null)
        {
            _connectedWallProprieties = _connectedWall.GetComponent <WallProprieties>();
            _connectedWallChange      = _connectedWall.GetComponent <WallChange>();
        }
    }
Beispiel #3
0
 //gère les dommages des murs connectés
 public void ConnectedtWallDammage(float myDammage, GameObject thisWall, WallProprieties connectedWallProprieties, WallChange connectedWallChange)
 {
     if (!connectedWallProprieties.GetIsIndestructible())
     {
         connectedWallChange.SetDammageFromConnect(myDammage);
     }
 }