Beispiel #1
0
    protected override void Start()
    {
        base.Start();
        SkillEffectModel = Instantiate(LoadDataManager.instance.SkillEffectPrefabDic["SpeedUpEffect"], playerSc.transform);
        SkillEffectModel.transform.localPosition = new Vector2(0, 0);
        SkillEffectModel.SetActive(false);
        originalSpeed = playerSc.pDATA.maxSpeedValue;

        playerChangeColor  = Color.blue;
        durationTime       = 5f;
        coolTime           = 10f;
        consumeCatnipValue = 5;
    }
Beispiel #2
0
    protected override void Start()
    {
        base.Start();
        SkillEffectModel = Instantiate(LoadDataManager.instance.SkillEffectPrefabDic["AttackUpEffect"], playerSc.transform);
        SkillEffectModel.transform.localPosition = new Vector2(0, 0);
        SkillEffectModel.SetActive(false);
        attackEffectModel   = playerSc.attackEffectModel.gameObject;
        spriteOfEffectModel = attackEffectModel.GetComponent <SpriteRenderer>();


        playerChangeColor   = Color.red;
        originalDamage      = playerSc.pDATA.attackDamage;
        effectOriginalColor = spriteOfEffectModel.color;
        originalScale       = attackEffectModel.transform.localScale;
        changeScale         = originalScale * 1.5f;
        plusDamage          = (int)(playerSc.pDATA.attackDamage * plusDamagePer);
        durationTime        = 5f;
        coolTime            = 5f;
        consumeCatnipValue  = 5;
    }
Beispiel #3
0
 public void ResponseSkill(SkillEffectModel model)
 {
     MapScript subjectMap = model.IsMyTurn ? myMap : otherMap;
     SkillType type = subjectMap.GetCharacter(model.SubjectHeroIdx).GetSkillType(model.CastingSkill);
     subjectMap.GetCharacter(model.SubjectHeroIdx).SkillAction(type);
     
     for(int i= 0; i < model.AffectedPosNum; ++i)
     {
         MapScript affactedMap = model.IsMyField[i] ? myMap : otherMap;
         affactedMap.MakeSkillEffect(model.AffectedPositions[i], type);
     }
 }