コード例 #1
0
 protected override void ExitDepop()
 {
     if (!Object.op_Inequality((Object)this.habitatPoint, (Object)null))
     {
         return;
     }
     this.habitatPoint.StopUse(this);
     this.habitatPoint = (FrogHabitatPoint)null;
 }
コード例 #2
0
 protected override void OnDestroy()
 {
     this.Active = false;
     if (Object.op_Inequality((Object)this.habitatPoint, (Object)null))
     {
         this.habitatPoint.StopUse(this);
         this.habitatPoint = (FrogHabitatPoint)null;
     }
     base.OnDestroy();
 }
コード例 #3
0
 public void Initialize(FrogHabitatPoint _habitatPoint)
 {
     this.Clear();
     if (Object.op_Equality((Object)(this.habitatPoint = _habitatPoint), (Object)null))
     {
         this.SetState(AnimalState.Destroyed, (System.Action)null);
     }
     else if (!this.habitatPoint.SetUse(this))
     {
         this.SetState(AnimalState.Destroyed, (System.Action)null);
     }
     else
     {
         MapArea ownerArea = this.habitatPoint.OwnerArea;
         this.ChunkID = !Object.op_Inequality((Object)ownerArea, (Object)null) ? 0 : ownerArea.ChunkID;
         this.LoadBody();
         this.SetStateData();
         this.NavMeshCon.Animator = this.animator;
         if (Object.op_Inequality((Object)this.animator, (Object)null))
         {
             this.rootMotion = ((Component)this.animator).GetOrAddComponent <AnimalRootMotion>();
         }
         SkinnedMeshRenderer componentInChildren = (SkinnedMeshRenderer)((Component)this).GetComponentInChildren <SkinnedMeshRenderer>(true);
         this.material          = !Object.op_Inequality((Object)componentInChildren, (Object)null) ? (Material)null : ((Renderer)componentInChildren).get_material();
         this.rootMotion.OnMove = (System.Action <Vector3, Quaternion>)((p, q) =>
         {
             this.NavMeshCon.Move(Vector3.op_Subtraction(p, this.Position));
             Quaternion quaternion = Quaternion.op_Multiply(q, Quaternion.Inverse(this.Rotation));
             Vector3 eulerAngles   = ((Quaternion) ref quaternion).get_eulerAngles();
             eulerAngles.x = (__Null)(double)(eulerAngles.z = (__Null)0.0f);
             WildFrog wildFrog = this;
             // ISSUE: explicit non-virtual call
             // ISSUE: explicit non-virtual call
             __nonvirtual(wildFrog.Rotation) = Quaternion.op_Multiply(__nonvirtual(wildFrog.Rotation), Quaternion.Euler(eulerAngles));
         });
         bool flag = false;
         this.BodyEnabled   = flag;
         this.MarkerEnabled = flag;
         this.NavMeshCon.SetEnabled(false);
         this.TargetMapArea = this.habitatPoint.OwnerArea;
         this.IsNearPlayer  = false;
         this.SetState(AnimalState.Start, (System.Action)null);
     }
 }