Esempio n. 1
0
    void Update()
    {
        if (Extensions.Editor()) {
            if (keyColor == null) {
                Debug.Log("Key {0}: keyColor missing; set some", this);
                keyColor = FindObjectOfType<KeyColor>();
            }
        }
        colored.color = keyColor.color;
        colored.Update();

        //if (!Extensions.Editor()) {
        //    gameObject.name = string.Format("{0} key{1}", keyColor.name, inventorySlot == null ? "" : " in " + inventorySlot.name);
        //}
    }
Esempio n. 2
0
 void Update()
 {
     if (Extensions.Editor()) {
         if (keyColor != oldKeyColor) {
             oldKeyColor = keyColor;
             closed = opened = keyColor.color;
             opened.a = openedAlpha;
             closed.a = closedAlpha;
         }
         colored.color = closed;
         colored.Update();
     } else {
         GetComponent<MeshRenderer>().material.ChangeAlpha(Opened(Player.instance.current) ? openedAlpha : closedAlpha);
     }
 }
Esempio n. 3
0
 public void ReceiveKey(KeyColor keyColor)
 {
     dict[keyColor].received = true;
 }
Esempio n. 4
0
 public bool IsKeyReceived(KeyColor keyColor)
 {
     if(!dict.ContainsKey(keyColor))
         return false;
     return dict[keyColor].received;
 }