Exemplo n.º 1
0
    // This overrides unlockSlot if called directly: (It can ONLY be used on init directly though to sync with clients)
    // This is used by ALL
    public void SetUnlock <U>(int unlockSlot) where U : Unlock
    {
        Unlock unlock = getUnlock <U>();

        UnlocksEquipped [unlockSlot] = (Unlock)unlock.Clone();
        UnlocksEquipped [unlockSlot].setUnlockType(unlock.getUnlockType());           // Just to be consistent.
        UnlocksEquipped [unlockSlot].whichBind = unlockSlot;
        UnlocksEquipped[unlockSlot].InitAll(GetComponent <PlayerMove>());
    }