protected Node IncapacitateFromBehind(SmartCharacter user) { return new Sequence( user.Node_GoTo(Val.V(() => this.WaypointBack.transform.position)), user.Node_Orient(Val.V(() => this.WaypointBack.transform.rotation)), user.behavior.ST_PlayHandGesture("bash", 1000), new LeafInvoke(() => this.CreateSlidebackTarget()), this.behavior.ST_PlayBodyGesture("dying", 2000), new LeafInvoke(() => this.DecorationStars.gameObject.SetActive(true)), this.Node_Set(StateName.IsIncapacitated)); }
protected Node ST_FaceEachother( SmartCharacter user) { Quaternion thisLook = Quaternion.identity; Quaternion userLook = Quaternion.identity; return new Sequence( new LeafInvoke(() => thisLook = Quaternion.LookRotation(user.transform.position - this.transform.position, Vector3.up)), new LeafInvoke(() => userLook = Quaternion.LookRotation(this.transform.position - user.transform.position, Vector3.up)), new Race( new LeafWait(3000), new SequenceParallel( this.Node_Orient(thisLook), user.Node_Orient(userLook))), new SequenceParallel( new LeafInvoke(() => this.transform.rotation = thisLook), new LeafInvoke(() => user.transform.rotation = userLook))); }
protected Node GuardRear(SmartCharacter user) { return new Sequence( user.Node_GoTo(this.GuardWaypointRear.position), user.Node_Orient(this.GuardWaypointRear.rotation), user.Node_Set(StateName.IsGuarding, StateName.IsImmobile), user.Node_Set(this.Id, RelationName.IsGuarding), this.Node_Set(StateName.IsGuarded)); }