示例#1
0
    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>();
        }
    }
    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();
    }
    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
 void Awake()
 {
     anim = GetComponentInChildren<Animator>();
     attk_handler = GetComponent<Player_HeroAttackHandler>();
 }