コード例 #1
0
 internal FlyingAreaModel(FlyingAgentModel agent, Vector3 target, bool isInsideArea,
                          float doneReward, float failReward)
 {
     this.agent        = agent;
     this.target       = target;
     this.isInsideArea = isInsideArea;
     this.doneReward   = doneReward;
     this.failReward   = failReward;
 }
コード例 #2
0
        public static FlyingAgentModel Update(FlyingAgentModel agent,
                                              Vector3?position = null,
                                              Vector3?target   = null,
                                              Vector3?rotation = null,
                                              float?speed      = null,
                                              Vector3?velocity = null)
        {
            var newPosition = position.GetValueOrDefault(agent.position);
            var newTarget   = target.GetValueOrDefault(agent.target);
            var newSpeed    = speed.GetValueOrDefault(agent.speed);
            var newVelocity = velocity.GetValueOrDefault(agent.velocity);
            var newRotation = rotation.GetValueOrDefault(agent.rotation);

            return(new FlyingAgentModel(newPosition, newRotation, newTarget, newSpeed, newVelocity));
        }