Example #1
0
 public static ChargePlayer Instance()
 {
     if (ChargePlayer.singleton == null)
     {
         ChargePlayer.singleton = new ChargePlayer();
     }
     return(ChargePlayer.singleton);
 }
Example #2
0
    private Sequence MediumHealthPattern()
    {
        ChargePlayer charge = new ChargePlayer(gameObject, enemy, attackDistance);
        //PlayerNotAround nextToPlayer = new PlayerNotAround(charge, gameObject, stoppingDistance);
        ActionNode attackPlayer = Attack(attack1);

        return(new Sequence(new List <Node> {
            charge, attackPlayer
        }));
    }
Example #3
0
    private Selector LowHealthPattern()
    {
        //PlayAnimation shootWeb = new PlayAnimation(gameObject, taunt);
        ShootWeb web = new ShootWeb(gameObject, webProjectile, enemy);

        //PlayerNotDisabled playerDisabled = new PlayerNotDisabled(web, enemy);
        NoCooldown noCooldown = new NoCooldown(web, fireRate);
        //PlayerAround playerAround = new PlayerAround(noCooldown, gameObject, enemy, playerDistance);

        //Sequence webSequence = new Sequence(new List<Node> { noCooldown, web });

        ChargePlayer charge       = new ChargePlayer(gameObject, enemy, attackDistance);
        ActionNode   attackPlayer = Attack(attack1);
        //PrioritySelector attackTarget = new PrioritySelector(new List<Node> { webSequence, attackPlayer });
        Sequence attackSequence = new Sequence(new List <Node> {
            charge, attackPlayer
        });

        Selector selector = new Selector(new List <Node> {
            noCooldown, attackSequence
        });

        return(selector);
    }
Example #4
0
 public static ChargePlayer creaChargePlayer()
 {
     return(ChargePlayer.Instance());
 }