// Use this for initialization
    void Awake()
    {
        if (GameObject.FindGameObjectsWithTag(transform.tag).Length > 1)
        {
            Destroy(gameObject);
            return;
        }

        EquipmentScript    = GetComponent <Player_Equipment_Script>();
        SkillsScript       = GetComponent <Player_Skills_Script>();
        InventoryScript    = GetComponent <Player_Inventory_Script>();
        ControllerScript   = GetComponent <Player_Controller_Script>();
        DetailsScript      = GetComponent <Player_Details_Script>();
        ReputationScript   = GetComponent <Player_Reputation_Script>();
        AbilitiesInterface = GameObject.Find("Interface/Abilities").GetComponent <Abilities_Interface>();
        DialogInterface    = GameObject.Find("Interface/Dialog").GetComponent <Dialog_Interface>();
    }
Example #2
0
 void Start()
 {
     hpBar         = transform.GetChild(0).GetComponent <Slider>();
     resourceBar   = transform.GetChild(1).GetComponent <Slider>();
     playerDetails = Player_Accessor_Script.DetailsScript;
 }
 private void Start()
 {
     projectileTick = 0f;
     playerDetsRef  = Player_Accessor_Script.DetailsScript;
 }