// Use this for initialization
    void Start()
    {
        rigidbody_player = GetComponent <Rigidbody2D>();
        animator_player  = gameObject.GetComponent <Animator> ();
        animator_head    = GameObject.Find("player_head").GetComponent <Animator> ();
        animator_handR   = GameObject.Find("player_handR").GetComponent <Animator> ();
        animator_handL   = GameObject.Find("player_handL").GetComponent <Animator> ();

        animator_melee = GameObject.Find("player_melee_slot").GetComponent <Animator> ();

        animator_ranged = GameObject.Find("player_ranged_slot").GetComponent <Animator> ();


        player_action_receiver = GameObject.Find("player_action_receiver").GetComponent <BoxCollider2D> ();
        settings         = GameObject.Find("Settings").GetComponent <Settings>();
        inventory_setter = GameObject.Find("inventory_canvas").GetComponent <inventory_ui> ();
        hotbar           = GameObject.Find("hotbar_slot").GetComponent <hotbar_controler> ();

        next_blink = Random.Range(3f, 7f);

        objective_canvas = GameObject.Find("objective_canvas").GetComponent <Canvas> ();
        hotbar_canvas    = GameObject.Find("hotbar_canvas").GetComponent <Canvas> ();

        StartCoroutine(init_close_objective());
    }
Example #2
0
 void Awake()
 {
     if (hotbar_controler.instance != null)
     {
         Destroy(this);
     }
     hotbar_controler.instance = this;
 }