Exemplo n.º 1
0
        // Initialize Widget's starting Inventory--------------------------------
        public void Awake()
        {
            playerStatus = GetComponent<Widget_Status>();
            widgetInventory = new int[(int) InventoryItem.COUNT_NUM_ITEMS];

            foreach (InventoryItem item in widgetInventory)
            {
                widgetInventory[(int)item] = 0;
            }

            // Give Widget some starting items
            widgetInventory[(int)InventoryItem.ENERGYPACK] = 1;
            widgetInventory[(int)InventoryItem.REPAIRKIT] = 2;
        }
Exemplo n.º 2
0
 // Initialize Player Info------------------
 public void Start()
 {
     playerInfo = FindObjectOfType<Widget_Status>();
     customControls = FindObjectOfType<GUI_CustomControls>();
     playerInvo = FindObjectOfType<Widget_Inventory>();
     playerAttack = FindObjectOfType<Widget_AttackController>();
     player = GameObject.FindWithTag("Player");
 }
Exemplo n.º 3
0
 public void Awake()
 {
     controller = GetComponent<CharacterController>();
     widgetStatus = GetComponent<Widget_Status>();
 }
Exemplo n.º 4
0
 public void OnTriggerEnter(Collider other)
 {
     print("ow!");
     playerStatus = GameObject.FindWithTag("Player").GetComponent<Widget_Status>();
     playerStatus.ApplyDamage(damage);
 }