Пример #1
0
    public override void ApplyBehaviour()
    {
        target = GameObject.FindGameObjectWithTag("Player").transform;
        GoToAction newAction = Owner.gameObject.AddComponent <GoToAction>();

        newAction.target           = target;
        newAction.actionPriority   = 100;
        newAction.distanceToTarget = 0.8f;
        newAction.speedMultiplier  = 2f;
        Owner.ScheduleNewAction(newAction);
        KillPlayerAction newIdleAction = Owner.gameObject.AddComponent <KillPlayerAction>();

        Owner.ScheduleNewAction(newIdleAction);
    }
Пример #2
0
 protected override void HandleActions()
 {
     damagingAction = new KillPlayerAction(healthService, clickedBehaviour);
     deathAction    = new ActionOnNotify(passedFinishBehavior).SetAction(Die);
 }