コード例 #1
0
    bool skillPhase;//phaseOne = user has clicked to know the skill range

    protected override void Start()
    {
        base.Start();
        _mySkill = gameObject.AddComponent <ShieldSkill>();
        skills.Add(_mySkill);
        _mySkill.infoCanvas = infoCanvas;
        pMainSkill          = _mySkill;
    }
コード例 #2
0
    private void Awake()
    {
        ShieldSkill s = GetComponentInParent <ShieldSkill>();

        if (s == null)
        {
            return;
        }

        s.OnDeactivateInstance.AddListener(() =>
        {
            GetComponent <ForceFieldController>().TargetValue = 0f;
        });
    }
コード例 #3
0
    public override void Activate(MonsterCharacter character, int index)
    {
        if (character.SkillCooldowns[index] > 0)
        {
            if (character.Buffs.ContainsKey((int)StatusEffect.Shield))
            {
                character.Buffs[(int)StatusEffect.Shield].GetComponent <Skill>().DeActivateInstance();
                character.Buffs.Remove((int)StatusEffect.Shield);
            }
        }
        else
        {
            if (character.ChargePoints < ChargeCostPerSecond)
            {
                return;
            }

            Sounds.CreateSound(ActivationSound);

            ShieldSkill s = Instantiate(this, character.transform);
            s.targetCharacter = character;
            s.skillIndex      = index;
        }
    }