예제 #1
0
        protected virtual Node.Node CreateAttackingSequence()
        {
            Node.Node targetingSequence = CreateTargetingSequence();

            //create ability node
            CooldownNode cooldownNode       = new CooldownNode(this, ProjectileAttackRate);
            AnimatorNode shootAnimationNode = new AnimatorNode(this, m_AnimatorRef, "IsShooting", ref m_ShootLink);

            //TODO: UNCOMMENT THIS CODE AND ADD THE STRING NAME
            PlaySoundNode  shotNodeSFX            = new PlaySoundNode(this, "WorshipperShoot");
            SummonShotNode summonShotNode         = new SummonShotNode(this, ProjectileDamage, ProjectilePrefab, FireLocation, ProjectilePoolName, ProjectilePoolSize);
            CooldownNode   repositionCooldownNode = new CooldownNode(this, RepositionCooldown);

            //handle movement and movement
            BackAwayNode backAwayNode = new BackAwayNode(this, false, DirectionMultiplier);
            SideStepNode sideStep     = new SideStepNode(this, false, DirectionMultiplier);

            MovementOptionRandomNode randomMovementChoice = new MovementOptionRandomNode(this, backAwayNode, sideStep);

            SequenceNode attackingSequence = new SequenceNode(this, "Attacking Sequence", cooldownNode, shootAnimationNode, summonShotNode, shotNodeSFX, repositionCooldownNode, randomMovementChoice);

            //create the attacking options sequence for making the AI attack
            SequenceNode attackOptionSequence = new SequenceNode(this, "Attack Choice Sequence", targetingSequence, attackingSequence);

            return(attackOptionSequence);
        }
예제 #2
0
        protected override SelectorNode CreateBehaviour()
        {
            Node.Node fullAttackSequence = CreateAttackingSequence();

            //create the utility selector
            SelectorNode utilitySelector = new SelectorNode(this, "UtilitySelector", fullAttackSequence);

            return(utilitySelector);
        }
예제 #3
0
        protected override Node.Node CreateAttackingSequence()
        {
            Node.Node targetingSequence = CreateTargetingSequence();

            //Create the VampireSuckieSuckie attack sequence
            HealthLessThanNode healthCheckNode        = new HealthLessThanNode(this, PercentageOfHealthToAttack);
            UseOnceNode        usedShadowDrain        = new UseOnceNode(this);
            SequenceNode       healthandAttackNotUsed = new SequenceNode(this, "Health and Attack Check", healthCheckNode, usedShadowDrain);
            AnimatorNode       shadowDrainNode        = new AnimatorNode(this, m_AnimatorRef, "IsUsingDrainShot", ref m_DrainShotLink);
            ToggleAINode       toggleAINode           = new ToggleAINode(this);
            DrainningShotNode  fireProjectileNode     = new DrainningShotNode(this, ShadowDrainDamage, ShadowDrainProjectile, FireLocation, "AcolyteProjectile", 5);

            //TODO: UNCOMMENT AND ADD SOUND NAME
            //PlaySoundNode shadowDrainSFX = new PlaySoundNode(this, );

            SequenceNode shadowDrainSequence = new SequenceNode(this, "Shadow Drain Attack", healthandAttackNotUsed, shadowDrainNode, toggleAINode, /*shadowDrainSFX,*/ fireProjectileNode);

            //Create ability node
            CooldownNode   cooldownNode           = new CooldownNode(this, ProjectileAttackRate);
            AnimatorNode   shootAnimationNode     = new AnimatorNode(this, m_AnimatorRef, "IsShooting", ref m_ShootLink);
            SummonShotNode summonShotNode         = new SummonShotNode(this, ProjectileDamage, ProjectilePrefab, FireLocation, ProjectilePoolName, ProjectilePoolSize);
            CooldownNode   repositionCooldownNode = new CooldownNode(this, RepositionCooldown);
            //PlaySoundNode summonSFX = new PlaySoundNode(this,);

            //handle movement and movement
            BackAwayNode backAwayNode = new BackAwayNode(this, false, DirectionMultiplier * 2);
            SideStepNode sideStep     = new SideStepNode(this, false, DirectionMultiplier);

            MovementOptionRandomNode randomMovementChoice = new MovementOptionRandomNode(this, backAwayNode, sideStep);

            SequenceNode basicAttackingSequence = new SequenceNode(this, "Basic Attack Sequence", cooldownNode, shootAnimationNode, summonShotNode, /*summonSFX, */ repositionCooldownNode, randomMovementChoice);

            //create the attacking options sequence for making the AI attack
            SelectorNode attackSelector       = new SelectorNode(this, "Attack Selector", shadowDrainSequence, basicAttackingSequence);
            SequenceNode attackOptionSequence = new SequenceNode(this, "Attack Choice Sequence", targetingSequence, attackSelector);

            return(attackOptionSequence);
        }