protected Node Kill(SmartObject user) { // User Casting // TODO: Ths is going to get ugly if the cast fails... SmartCharacter character = (SmartCharacter)user; return new Sequence( user.Node_Require(StateName.RoleActor, StateName.IsStanding, ~StateName.HoldingBall, ~StateName.HoldingDrink, ~StateName.IsIncapacitated), this.Node_Require(StateName.RoleActor, StateName.IsStanding, ~StateName.IsDead), new LeafAssert(() => user != this), // Not reflexive character.Node_GoToUpToRadius(new Val<Vector3>(this.transform.position), 1.0f), new LeafInvoke(() => this.DecorationStars.gameObject.SetActive(false)), this.Node_Icon("skull"), this.Node_Set(StateName.IsDead, StateName.IsIncapacitated) ); }
protected Node TakeBall(SmartObject user) { // User Casting // TODO: Ths is going to get ugly if the cast fails... SmartCharacter character = (SmartCharacter)user; return new Sequence( user.Node_Require(StateName.RoleActor, StateName.IsStanding, ~StateName.HoldingBall, ~StateName.HoldingDrink, ~StateName.HoldingWallet, ~StateName.IsIncapacitated), this.Node_Require(StateName.RoleActor, StateName.HoldingBall, StateName.IsIncapacitated), character.Node_GoToUpToRadius(new Val<Vector3>(this.transform.position), 1.0f), character.Node_OrientTowards(new Val<Vector3>(this.transform.position)), new LeafInvoke(() => character.HoldPropRightHand.Attach(this.HoldPropRightHand.Release())), this.Node_Set(~StateName.HoldingBall), user.Node_Set(StateName.HoldingBall), new SequenceParallel( this.Node_StopInteraction(FullBodyBipedEffector.RightHand), character.Node_StartInteraction(FullBodyBipedEffector.RightHand, character.InteractionHoldRight))); }
protected Node TalkSecretively(SmartObject user) { return new Sequence( user.Node_Require(StateName.RoleActor, StateName.IsStanding, ~StateName.IsIncapacitated), this.Node_Require(StateName.RoleActor, StateName.IsStanding, ~StateName.IsIncapacitated), new LeafAssert(() => user != this), // Not reflexive this.ST_TalkSecretive((SmartCharacter)user) ); }