Beispiel #1
0
 public A_Ability CloneAbility(GameEnum.AbilityName abilityName, A_Airship owner)
 {
     /*
      * if (this.abilitiesDict.ContainsKey (abilityName))
      *      return this.abilitiesDict [abilityName].Clone (owner);
      * return null;
      */
     return(this.abilityFactory.CloneAbility(abilityName, owner));
 }
Beispiel #2
0
 protected A_Ability(GameEnum.AbilityName abilityName, int manaCost, float cooldown, float maxRange, AudioClip clip, A_Airship owner)
 {
     this.abilityName = abilityName;
     this.manaCost    = manaCost;
     this.cooldown    = cooldown;
     this.maxRange    = maxRange;
     this.clip        = clip;
     this.owner       = owner;
 }
    /*
     * this.abilitiesDict.Add(GameEnum.AbilityName.ABILITY_STRAIGHTBULLET, new Ability_StraightShot(this.abilityScriptables.straightShot.projectilePrefab, null));
     * this.abilitiesDict.Add(GameEnum.AbilityName.ABILITY_TARGETAOE, new Ability_TargetAOE(this.abilityScriptables.targetAOE.projectilePrefab, null));
     * this.abilitiesDict.Add(GameEnum.AbilityName.ABILITY_AUTOBULLET, new Ability_AutoBullet(this.abilityScriptables.autoBullet.projectilePrefab, null));
     * this.abilitiesDict.Add(GameEnum.AbilityName.ABILITY_FRONTSWIPE, new Ability_FrontSwipe(this.abilityScriptables.frontSwipe.swipePrefab, null));
     * this.abilitiesDict.Add(GameEnum.AbilityName.ABILITY_HOMINGMISSILE, new Ability_HomingMissile(this.abilityScriptables.homingMissile.projectilePrefab, null));
     * this.abilitiesDict.Add(GameEnum.AbilityName.ABILITY_BLINKFORWARD, new Ability_BlinkForward(null));
     */

    public A_Ability CloneAbility(GameEnum.AbilityName abilityName, A_Airship owner)
    {
        int abilityInt = (int)abilityName;

        if (abilityInt < this.abilityScriptables.abilities.Length)
        {
            SO_Abilities.AbilityProperties ability = this.abilityScriptables.abilities [abilityInt];

            switch (abilityName)
            {
            case GameEnum.AbilityName.NONE:
                break;

            case GameEnum.AbilityName.ABILITY_STRAIGHTBULLET:
                return(new Ability_StraightShot(ability.abilityName, ability.manaCost, ability.cooldown, ability.maxRange, ability.projectilePrefab, ability.clip, owner));

                break;

            case GameEnum.AbilityName.ABILITY_TARGETAOE:
                return(new Ability_TargetAOE(ability.abilityName, ability.manaCost, ability.cooldown, ability.maxRange, ability.projectilePrefab, ability.clip, owner));

                break;

            case GameEnum.AbilityName.ABILITY_AUTOBULLET:
                return(new Ability_AutoBullet(ability.abilityName, ability.manaCost, ability.cooldown, ability.maxRange, ability.projectilePrefab, ability.clip, owner));

                break;

            case GameEnum.AbilityName.ABILITY_FRONTSWIPE:
                return(new Ability_FrontSwipe(ability.abilityName, ability.manaCost, ability.cooldown, ability.maxRange, ability.projectilePrefab, ability.clip, owner));

                break;

            case GameEnum.AbilityName.ABILITY_HOMINGMISSILE:
                return(new Ability_HomingMissile(ability.abilityName, ability.manaCost, ability.cooldown, ability.maxRange, ability.projectilePrefab, ability.clip, owner));

                break;

            case GameEnum.AbilityName.ABILITY_BLINKFORWARD:
                return(new Ability_BlinkForward(ability.abilityName, ability.manaCost, ability.cooldown, ability.maxRange, ability.projectilePrefab, ability.clip, owner));

                break;

            default:
                break;
            }
        }

        return(null);
    }
Beispiel #4
0
 public void SetOwner(A_Airship owner)
 {
     this.owner = owner;
 }
 public Ability_StraightShot(GameEnum.AbilityName abilityname, int manaCost, float cooldown, float maxRange, GameObject projectilePrefab, AudioClip clip, A_Airship owner) : base(abilityname, manaCost, cooldown, maxRange, clip, owner)
 {
     this.projectilePrefab = projectilePrefab;
 }
Beispiel #6
0
 public FSMAction_RotateHeadingUpdate(A_Airship owner, Transform[] directions, float duration)
 {
     this.owner        = owner;
     this.directions   = directions;
     this.turnDuration = duration;
 }
 public FSMAction_MoveToPlayerEnter(A_Airship owner)
 {
     this.owner = owner;
 }
 public FSMAction_MoveToPlayerUpdate(A_Airship owner, A_Airship player)
 {
     this.owner  = owner;
     this.player = player;
 }
Beispiel #9
0
 public void SetTarget(A_Airship target)
 {
     this.target = target;
 }
Beispiel #10
0
 public FSMAction_MoveToPositionEnter(A_Airship owner)
 {
     this.owner = owner;
 }
Beispiel #11
0
 public FSMAction_MoveToPositionUpdate(A_Airship owner, Vector3 target)
 {
     this.owner  = owner;
     this.target = target;
 }
 public FSMAction_PatrolEnter(A_Airship owner)
 {
     this.owner = owner;
 }
 public FSMAction_PatrolUpdate(A_Airship owner, Transform[] patrolPoints)
 {
     this.owner        = owner;
     this.patrolPoints = patrolPoints;
 }