protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBCharacterGernericWalkAction)dup).PerformanceType = PerformanceType; ((LBCharacterGernericWalkAction)dup).AnimTransitionType = AnimTransitionType; ((LBCharacterGernericWalkAction)dup).bUseRestraintSpeedIn = bUseRestraintSpeedIn; ((LBCharacterGernericWalkAction)dup).SpeedRestraintIn = SpeedRestraintIn; ((LBCharacterGernericWalkAction)dup).bUseRestraintSpeedOut = bUseRestraintSpeedOut; ((LBCharacterGernericWalkAction)dup).SpeedRestraintOut = SpeedRestraintOut; ((LBCharacterGernericWalkAction)dup).bUseRestraintDirectionIn = bUseRestraintDirectionIn; ((LBCharacterGernericWalkAction)dup).DirectionRestraintIn = DirectionRestraintIn; ((LBCharacterGernericWalkAction)dup).bUseRestraintDirectionOut = bUseRestraintDirectionOut; ((LBCharacterGernericWalkAction)dup).DirectionRestraintOut = DirectionRestraintOut; ((LBCharacterGernericWalkAction)dup).BaseMovementSpeed = BaseMovementSpeed; ((LBCharacterGernericWalkAction)dup).BaseRotationSpeed = BaseRotationSpeed; ((LBCharacterGernericWalkAction)dup).MovementAcceleration = MovementAcceleration; ((LBCharacterGernericWalkAction)dup).bBlockExternalSpeed = bBlockExternalSpeed; ((LBCharacterGernericWalkAction)dup).bBlockExternalDir = bBlockExternalDir; ((LBCharacterGernericWalkAction)dup).bNeedsControlImpulse = bNeedsControlImpulse; ((LBCharacterGernericWalkAction)dup).bPreserveSpeed = bPreserveSpeed; ((LBCharacterGernericWalkAction)dup).bAutoDetectInputSpeed = bAutoDetectInputSpeed; }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); // ((LBTransPhysicsAction)dup).MovementDir = MovementDir; // ((LBTransPhysicsAction)dup).MovementSpeed = MovementSpeed; }
protected override void Activate(LBAction _prev, LBActionTransitTypes _transit) { base.Activate(_prev, _transit); TargetDir = MovementDir; // We should remember this value, because MovementDir may change bCanSetNewDir = false; }
// protected override void ActivateAnimation() // { // // if (AnimationTrasnitionType == LBAnimationTransitionTypes.Play) // { // PlayAnimation(AnimationName, AnimationLayer, 0); // } // else // { // CrossfadeAnimation(AnimationName, AnimationLayer, AnimationBlendTime); // } // } protected override bool CheckTransferConditions(LBAction _other, LBActionTransitTypes _transit, LBActionTransitDirection _dir) { if (_dir == LBActionTransitDirection.In) { if (bCanTurnInPlace()) { return(true); } else { return(false); } } else { if (!bCanTurnInPlace()) { return(true); } else { return(false); } } }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBCharacterLandAction)dup).bUseRestraintSpeedIn = bUseRestraintSpeedIn; ((LBCharacterLandAction)dup).bPreserveFlatSpeed = bPreserveFlatSpeed; }
LBAction[] FindOutputTransfers() { int i, j, k; LBAction[] actions; LBAction[] res = new LBAction[0]; if (Output == null || Output.Length == 0) { return(res); } actions = manager.AllActions; k = 0; for (i = 0; i < actions.Length; i++) { for (j = 0; j < Output.Length; j++) { if (actions [i].ActionName == Output [j].ActionName) { k++; Array.Resize(ref res, k); res [k - 1] = actions [i]; } } } return(res); }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBCharacterFallAction)dup).bPreserveFlatSpeed = bPreserveFlatSpeed; ((LBCharacterFallAction)dup).MaxFlatSpeed = MaxFlatSpeed; }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBCharacterAnimatedAction)dup).AnimationName = AnimationName; ((LBCharacterAnimatedAction)dup).AnimationLayer = AnimationLayer; ((LBCharacterAnimatedAction)dup).AnimationBlendTime = AnimationBlendTime; }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBCharacterStartWalkAction)dup).Conditions = new LBGenericTransferOutCondition[Conditions.Length]; Array.Copy(Conditions, ((LBCharacterStartWalkAction)dup).Conditions, Conditions.Length); //((LBCharacterStartWalkAction)dup).Conditions = System.Array.Copy(Conditions, ; }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBTransitiveAction)dup).Input = Input; ((LBTransitiveAction)dup).Output = Output; ((LBTransitiveAction)dup).TransferType = TransferType; }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBCharacterInstantMoveUp)dup).JumpHeight = JumpHeight; ((LBCharacterInstantMoveUp)dup).JumpSpeed = JumpSpeed; ((LBCharacterInstantMoveUp)dup).FlatMotionModifier = FlatMotionModifier; ((LBCharacterInstantMoveUp)dup).MaxFlatSpeed = MaxFlatSpeed; }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBPhysicsTransform)dup).InitialState = InitialState; ((LBPhysicsTransform)dup).Coordinates = Coordinates; ((LBPhysicsTransform)dup).TickOrder = TickOrder; ((LBPhysicsTransform)dup).TransformTool = TransformTool; }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBCharacterTurnInPlaceAction)dup).BaseRotationSpeed = BaseRotationSpeed; ((LBCharacterTurnInPlaceAction)dup).ThresholdAngle = ThresholdAngle; ((LBCharacterTurnInPlaceAction)dup).TrunLeftAnim90deg = TrunLeftAnim90deg; ((LBCharacterTurnInPlaceAction)dup).TrunRightAnim90deg = TrunRightAnim90deg; }
protected override void Activate(LBAction _prev, LBActionTransitTypes _transit) { base.Activate(_prev, _transit); if (bPreserveFlatSpeed) { origvel = new Vector3(RBSpeedVector.x, 0, RBSpeedVector.z); } }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBCharacterStandExAction)dup).bCheckBaseType = bCheckBaseType; ((LBCharacterStandExAction)dup).BaseType = BaseType; ((LBCharacterStandExAction)dup).bCheckNormal = bCheckNormal; ((LBCharacterStandExAction)dup).NormalDelta = NormalDelta; }
protected virtual bool CheckTransferConditions(LBAction _other, LBActionTransitTypes _transit, LBActionTransitDirection _dir) // нужно добавить проверку на наличие связи? { // if (_dir == LBActionTransitDirection.In) // return base.CanActivateAction (true); // else // return base.CanDeactivateAction(true); return(true); //no conditions in this class }
protected virtual void DuplicateProperties(LBAction dup) { dup.ActionName = ActionName; dup.ActionActivation = ActionActivation; dup.ActionDeactivation = ActionDeactivation; dup.action_state = LBActionStates.Inactive; dup.name = ActionName; }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBPhysicsOffset)dup).OverridenParent = OverridenParent; ((LBPhysicsOffset)dup).bApplyPosition = bApplyPosition; ((LBPhysicsOffset)dup).Position = Position; ((LBPhysicsOffset)dup).bApplyRotation = bApplyRotation; ((LBPhysicsOffset)dup).Rotation = Rotation; }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBCharacterMovementAction)dup).MovementDir = MovementDir; ((LBCharacterMovementAction)dup).MovementSpeed = MovementSpeed; ((LBCharacterMovementAction)dup).CharVelocityParamName = CharVelocityParamName; ((LBCharacterMovementAction)dup).CharDeltaRotXParamName = CharDeltaRotXParamName; ((LBCharacterMovementAction)dup).CharDeltaRotYParamName = CharDeltaRotYParamName; ((LBCharacterMovementAction)dup).CharDeltaRotZParamName = CharDeltaRotZParamName; }
protected override bool CheckTransferConditions(LBAction _other, LBActionTransitTypes _transit, LBActionTransitDirection _dir) // нужно добавить проверку на наличие связи? { if (_dir == LBActionTransitDirection.In) { return(base.CheckTransferConditions(_other, _transit, LBActionTransitDirection.In) && bCanLand()); } else { return(base.CheckTransferConditions(_other, _transit, LBActionTransitDirection.Out)); } }
protected override bool CheckTransferConditions(LBAction _other, LBActionTransitTypes _transit, LBActionTransitDirection _dir) // нужно добавить проверку на наличие связи? { if (_dir == LBActionTransitDirection.In) { return(bHasRBBase()); } else { return(true); } }
protected override bool CheckTransferConditions(LBAction _other, LBActionTransitTypes _transit, LBActionTransitDirection _dir) { if (_dir == LBActionTransitDirection.In) { return(base.CheckTransferConditions(_other, _transit, LBActionTransitDirection.In) && bHasWalkableFloor() && bHasImpulse); } else { return(base.CheckTransferConditions(_other, _transit, LBActionTransitDirection.Out)); } }
protected override bool CheckTransferConditions(LBAction _other, LBActionTransitTypes _transit, LBActionTransitDirection _dir) // нужно добавить проверку на наличие связи? { if (_dir == LBActionTransitDirection.In) { return(bHasWalkableFloor() && bHasPropperSpeed()); } else { return(true); } }
protected override bool CheckTransferConditions(LBAction _other, LBActionTransitTypes _transit, LBActionTransitDirection _dir) // нужно добавить проверку на наличие связи? { if (_dir == LBActionTransitDirection.In) { return(bIsWeightless()); //return true; //!bHasWalkableFloor (); } else { return(true); } }
protected bool HasOutputConn(LBAction action) { int i; for (i = 0; i < output.Length; i++) { if (output [i] == action) { return(true); } } return(false); }
protected int FindOutputIndex(LBAction action) { int i; for (i = 0; i < output.Length; i++) { if (output [i] == action) { return(i); } } return(-1); }
protected int FindConditionIndexForOutput(LBAction action) { int i; for (i = 0; i < Conditions.Length; i++) { if (Conditions [i].ActionName == action.ActionName) { return(i); } } return(-1); }
protected override void Activate(LBAction _prev, LBActionTransitTypes _transit) { base.Activate(_prev, _transit); // Vector3 v = RBSpeedVector; // // v.y = JumpInstantUpSpeed; // // rigidbody.velocity = v; lastrbvel = RBSpeedVector; jumpheight = 0; bUseGravity = rigidbody.useGravity; rigidbody.useGravity = false; bhasrestoredvel = false; }
protected override void Activate(LBAction _prev, LBActionTransitTypes _transit) { base.Activate(_prev, _transit); if (bPreserveSpeed) { // MovementSpeed = RBFlatSpeed; MovementDir = RBFlatSpeedDir; idealvelocity = new Vector3(RBSpeedVector.x, 0, RBSpeedVector.z); if (bAutoDetectInputSpeed) { base.SetMovementSpeed(idealvelocity.magnitude / BaseMovementSpeed); } } }
protected override void DuplicateProperties(LBAction dup) { base.DuplicateProperties(dup); ((LBCharacterFloatMovementAction)dup).MaxVelocity = MaxVelocity; ((LBCharacterFloatMovementAction)dup).UseInitialFloatLocation = UseInitialFloatLocation; ((LBCharacterFloatMovementAction)dup).FloatLocation = FloatLocation; ((LBCharacterFloatMovementAction)dup).UseProjection = UseProjection; ((LBCharacterFloatMovementAction)dup).ProjectionAxis = ProjectionAxis; ((LBCharacterFloatMovementAction)dup).UseRestraintX = UseRestraintX; ((LBCharacterFloatMovementAction)dup).RotationRestraintX = RotationRestraintX; ((LBCharacterFloatMovementAction)dup).UseRestraintY = UseRestraintY; ((LBCharacterFloatMovementAction)dup).RotationRestraintY = RotationRestraintY; ((LBCharacterFloatMovementAction)dup).UseRestraintZ = UseRestraintZ; ((LBCharacterFloatMovementAction)dup).RotationRestraintZ = RotationRestraintZ; }