コード例 #1
0
 public override void GoToEndState()
 {
     if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mController, (UnityEngine.Object)null))
     {
         this.mController = this.GetController();
     }
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mController, (UnityEngine.Object)null) && this.mController.IsLoading)
     {
         return;
     }
     ((Component)this.mController).get_transform().set_position(EventAction.PointToWorld(this.mPoints[this.mPoints.Length - 1]));
 }
コード例 #2
0
        public override void GoToEndState()
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mController, (UnityEngine.Object)null))
            {
                this.mController = this.GetController();
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mController, (UnityEngine.Object)null) && this.mController.IsLoading)
            {
                return;
            }
            Debug.LogWarning((object)("Target grid position: " + (object)this.mPoints[this.mPoints.Length - 1]));
            Vector3 world = EventAction.PointToWorld(this.mPoints[this.mPoints.Length - 1]);

            ((Component)this.mController).get_transform().set_position(world);
            Debug.LogWarning((object)("Setting unit " + this.mController.Unit.UnitName + " position: " + (object)world));
        }
コード例 #3
0
 private void StartMove()
 {
     if (this.GotoRealPosition && Object.op_Inequality((Object)this.mController, (Object)null) && this.mController.Unit != null)
     {
         Array.Resize <IntVector2>(ref this.mPoints, this.mPoints.Length + 1);
         this.mPoints[this.mPoints.Length - 1] = new IntVector2(this.mController.Unit.x, this.mController.Unit.y);
     }
     else
     {
         this.GotoRealPosition = false;
     }
     Vector3[] route = new Vector3[this.mPoints.Length];
     for (int index = 0; index < this.mPoints.Length; ++index)
     {
         route[index] = EventAction.PointToWorld(this.mPoints[index]);
     }
     double num = (double)this.mController.StartMove(route, this.Angle);
 }