示例#1
0
 protected void OnSelfEnter()
 {
     this.currentState = FakeDrop.FakeDropState.None;
     if (EntityWorld.Instance.EntSelf != null)
     {
         EntityWorld.Instance.EntSelf.GetFakeDrop();
     }
     FakeDrop.DeleteFakeDrop(this);
 }
示例#2
0
 protected void FlyingToWaitPosition()
 {
     this.flyToWaitPositionTime += this.deltaTime;
     if (this.flyToWaitPositionTime < FakeDrop.FlyToWaitPositionDefaultTime)
     {
         base.get_transform().Translate(this.flyToWaitPositionSpeed * this.deltaTime);
     }
     else
     {
         this.currentState = FakeDrop.FakeDropState.Wait;
         base.get_transform().set_position(this.waitPosition);
         this.animator.Play("idle");
         this.waitFxID = FXManager.Instance.PlayFX(this.waitFxModelID, base.get_transform(), Vector3.get_zero(), Quaternion.get_identity(), 1f, 1f, 0, false, 0, null, null, 1f, FXClassification.Normal);
         this.waitCollider.set_enabled(true);
     }
 }
示例#3
0
 private void Update()
 {
     this.deltaTime = Time.get_deltaTime();
     FakeDrop.FakeDropState fakeDropState = this.currentState;
     if (fakeDropState != FakeDrop.FakeDropState.FlyToWait)
     {
         if (fakeDropState == FakeDrop.FakeDropState.Wait)
         {
             this.Waiting();
         }
     }
     else
     {
         this.FlyingToWaitPosition();
     }
 }
示例#4
0
 protected void Waiting()
 {
     this.waitTime += this.deltaTime;
     if (this.waitTime < this.WaitDefaultTime)
     {
         return;
     }
     this.currentState = FakeDrop.FakeDropState.FlyToEntity;
     if (EntityWorld.Instance.ActSelf)
     {
         this.flyToEntityFxID = FXManager.Instance.PlayFXOfFollow(this.flyToEntityFxModelID, base.get_transform().get_position(), EntityWorld.Instance.ActSelf.FixTransform, (float)FakeDrop.FlyToEntityDefaultSpeed, 0.2f, 0f, delegate
         {
             if (EntityWorld.Instance.EntSelf != null)
             {
                 EntityWorld.Instance.EntSelf.GetFakeDrop();
             }
             FakeDrop.DeleteFakeDrop(this);
         }, FXClassification.Normal);
     }
     this.Hide();
 }