コード例 #1
0
ファイル: GlowOnPhase.cs プロジェクト: SantanaDVX/CardGameRPG
    private new void Start() {
        base.Start();
        if (character == null) {
            character = GetComponentInParent<BaseCard>().character;
        }

        if (!glowOnlyOnActivePlayer || (glowOnlyOnActivePlayer && character.playerCharacter)) {
            EventManager.StartListening(TurnMaster.getStartPhaseTrigger(glowPhase, character.gameObject.GetInstanceID()), startGlow);
            EventManager.StartListening(TurnMaster.getEndPhaseTrigger(glowPhase, character.gameObject.GetInstanceID()), endGlow);
            if (TurnMaster.currentPhase == glowPhase) {
                startGlow();
            }
        }
    }
コード例 #2
0
    private void Awake()
    {
        shuffleDeck();
        activeBlock = null;
        EventManager.StartListening(TurnMaster.getGenericStartPhaseTrigger(), refreshUI);
        EventManager.StartListening(TurnMaster.getStartPhaseTrigger(Phase.Draw, gameObject.GetInstanceID()), drawStep);
        if (!playerCharacter)
        {
            EventManager.StartListening(TurnMaster.getEndTurnTrigger(gameObject.GetInstanceID()), turnOffUI);
        }

        if (equippedWeapon != null)
        {
            equippedWeapon.equip(this);
        }

        if (equippedArmor != null)
        {
            equippedArmor.equip(this);
        }
    }