コード例 #1
0
ファイル: Player_UIHandler.cs プロジェクト: cesarrac/TheyRise
    void Start()
    {
        if (resourceManager == null) {
            resourceManager = GetComponent<Player_ResourceManager>();
        }
        GetResourcesText ();
        foodCostText.color = Color.red;

        // Get the player hero component
        if (!playerhero) {
            playerhero = GameObject.FindGameObjectWithTag("Player").GetComponent<Player_HeroAttackHandler>();
        }
    }
コード例 #2
0
    void Start()
    {
        // Make sure this script has access to Player Attack Handler
        if (!playerAttackHandler) {
            playerAttackHandler = GetComponent<Player_HeroAttackHandler> ();
        } else {
            Debug.Log ("PLAYER SURVIVAL: Player's Attack Handler is NOT set!!");
        }

        // Initialize the survival stats
        survStats.Init();
    }
コード例 #3
0
    void Start()
    {
        // Make sure this script has access to Player Attack Handler
        if (!playerAttackHandler) {
            playerAttackHandler = GetComponent<Player_HeroAttackHandler> ();
        }

        // Initialize the survival stats
        survStats.Init();
    }
コード例 #4
0
ファイル: Equip_Item.cs プロジェクト: cesarrac/TheyRise-game
 void Awake()
 {
     anim = GetComponentInChildren<Animator>();
     attk_handler = GetComponent<Player_HeroAttackHandler>();
 }