Ejemplo n.º 1
0
    void Start()
    {
        var go = GameObjectExtensions.FindParentByTag(gameObject, "Player");

        player = go.GetComponent <Player>();

        player.attack = attack;
    }
Ejemplo n.º 2
0
    void Start()
    {
        var go = GameObjectExtensions.FindParentByTag(gameObject, "Player");

        player = go.GetComponent <Player>();

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

        player = go.GetComponent <Player>();

        player.maxStamina = maxStamina;
        player.stamina    = maxStamina;
    }
Ejemplo n.º 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);
    }