Exemple #1
0
    void Start()
    {
        var go = GameObjectExtensions.FindParentByTag(gameObject, "Player");

        player = go.GetComponent <Player>();

        player.attack = attack;
    }
    void Start()
    {
        var go = GameObjectExtensions.FindParentByTag(gameObject, "Player");

        player = go.GetComponent <Player>();

        player.speed           = speed;
        player.dashStaminaCost = dashStaminaCost;
    }
Exemple #3
0
    void Start()
    {
        var go = GameObjectExtensions.FindParentByTag(gameObject, "Player");

        player = go.GetComponent <Player>();

        player.maxStamina = maxStamina;
        player.stamina    = maxStamina;
    }
Exemple #4
0
    void Start()
    {
        var go = GameObjectExtensions.FindParentByTag(gameObject, "Player");

        player = go.GetComponent <Player>();

        player.health = health;
        var newScale = player.gameObject.transform.localScale.x * scale;

        player.gameObject.transform.localScale = new Vector3(newScale, newScale, newScale);
    }