コード例 #1
0
        public Checkpoint(string checkpointNumber, DateTime checkpointTime,
                          string[] checkpointProcessIndicator,
                          string[] checkpointUpdateIndicator, string checkpointCheckMethodIndicator,
                          SimulatorBase checkpointTransferObject, CheckpointArgs checkpointTransferArgs,
                          string checkpointTypeIndicator, bool checkpointConstancy, bool checkpointCanBeSaved)
        {
            CheckpointNumber = checkpointNumber;
            CheckpointTime   = checkpointTime;

            CheckpointProcessIndicators = checkpointProcessIndicator;

            CheckpointUpdateIndicators     = checkpointUpdateIndicator;
            CheckpointCheckMethodIndicator = checkpointCheckMethodIndicator;
            CheckpointTransferObject       = checkpointTransferObject;

            CheckpointTransferArgs  = checkpointTransferArgs;
            CheckpointTypeIndicator = checkpointTypeIndicator;

            CheckpointIsConstant = checkpointConstancy;
            CheckpointCanBeSaved = checkpointCanBeSaved;

            _checkFinishMethod = (sender, args) => false;


            GenerateCheckpoint();
        }
コード例 #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("Player"))
     {
         currentCP = this;
     }
 }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     if (startCheckPoint)
     {
         currentCP = this;
         respawnPlayer(GameObject.FindGameObjectWithTag("Player"));
     }
 }
コード例 #4
0
ファイル: Enemy.cs プロジェクト: shieldgenerator7/NewtonTCPIP
 private void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.CompareTag("Player") && !dead)
     {
         CheckpointChecker.respawnPlayer(collision.gameObject);
         transform.position = startPos;
         onCollisionExtra();
     }
     otherCollisionExtra(collision);
 }
コード例 #5
0
        public Checkpoint(string checkpointNumber, DateTime checkpointTime,
                          string[] checkpointProcessIndicator,
                          string[] checkpointUpdateIndicator, string checkpointCheckMethodIndicator,
                          string checkpointTypeIndicator)
        {
            CheckpointNumber            = checkpointNumber;
            CheckpointTime              = checkpointTime;
            CheckpointProcessIndicators = checkpointProcessIndicator;

            CheckpointUpdateIndicators     = checkpointUpdateIndicator;
            CheckpointCheckMethodIndicator = checkpointCheckMethodIndicator;
            CheckpointTypeIndicator        = checkpointTypeIndicator;

            _checkFinishMethod = (sender, args) => false;
            GenerateCheckpoint();
        }
コード例 #6
0
 /// <summary>
 /// Resets the player's position after he fails
 /// </summary>
 public void respawn()
 {
     CheckpointChecker.respawnPlayer(gameObject);
 }
コード例 #7
0
 /// <summary>
 ///     设置检查方法
 /// </summary>
 /// <param name="checker"></param>
 public void SetCheckMethod(CheckpointChecker checker) => _checkFinishMethod = checker;