Ejemplo n.º 1
0
    //use a skill
    public string useSkill(PongSkill skill)
    {
        if (!isAction() && !skill.isOnCooldown())
        {
            //normal
            skill.goOnCooldown();
            switch (skill.getName())
            {
            //sora
            case "lightning strike":
                useLightningStrike();
                break;

            case "breeze":
                useBreeze();
                break;

            case "whiplash":
                useWhiplash();
                break;

            //vida
            case "firewall":
                useFirewall();
                break;

            case "fireblast":
                useFireblast();
                break;

            case "forward smash":
                paddleScript.forwardSmash();
                break;

            case "ignite":
                useIgnite();
                break;
            }
            currentSkill = skill;
            //rising wind check
            if (getSkillPassive().getName() == "rising wind")
            {
                getSkillPassive().risindWindDecrement();
            }
            return(skill.getName());
        }
        else
        {
            return("none");
        }
    }
Ejemplo n.º 2
0
    //skills affecting this ball
    void paddleEffectsCheck(PlayerController pc)
    {
        //check player's current skills
        PongSkill skill     = pc.getCurrentSkill();
        string    skillName = skill.getName();

        if (pc.isAction())
        {
            if (skillName == "forward smash")
            {
                velocity = new Vector3(velocity.x * skill.getMovementModifier().x, velocity.y * skill.getMovementModifier().y, velocity.z * skill.getMovementModifier().z);
            }
            if (skillName == "lightning strike")
            {
                addEffect("lightning straight");
            }
        }
    }
Ejemplo n.º 3
0
 // Update is called once per frame
 void Update()
 {
     //playerInput();
     paddleScript.setVerticalMove(vMove);
     stayWithinBoundaries();
     action = paddleScript.getCurrentAction();
     //check effects
     updateEffects();
     //rising wind check
     if (getSkillPassive().getName() == "rising wind")
     {
         paddleScript.bonusSpeed(getSkillPassive().getRisingWind());
     }
     //check skill
     if (skillA.getName() != "null")
     {
         updateSkills();
     }
     else
     {
         print("MISSING SKILLS");
     }
     //debug
 }
 //use a skill
 public string useSkill(PongSkill skill)
 {
     if(!isAction() && !skill.isOnCooldown()){
         //normal
         skill.goOnCooldown();
         switch(skill.getName()){
         //sora
         case "lightning strike":
             useLightningStrike();
             break;
         case "breeze":
             useBreeze();
             break;
         case "whiplash":
             useWhiplash();
             break;
         //vida
         case "firewall":
             useFirewall();
             break;
         case "fireblast":
             useFireblast();
             break;
         case "forward smash":
             paddleScript.forwardSmash();
             break;
         case "ignite":
             useIgnite();
             break;
         }
         currentSkill = skill;
         //rising wind check
         if(getSkillPassive().getName() == "rising wind"){
             getSkillPassive().risindWindDecrement();
         }
         return skill.getName();
     }else{
         return "none";
     }
 }