// Token: 0x06001981 RID: 6529 RVA: 0x00061EE0 File Offset: 0x000600E0
    public bool SmudgeTo(Vector3 worldSkinnedBottom)
    {
        if (!this.Exists)
        {
            return(false);
        }
        Vector3 position = base.transform.position;

        if (position == worldSkinnedBottom)
        {
            return(true);
        }
        Vector3        vector = worldSkinnedBottom - position;
        global::CCDesc ccdesc = this.totemicObject.CCDesc;

        if (!ccdesc)
        {
            return(false);
        }
        Vector3 vector2;

        vector2.x = (vector2.z = 0f);
        vector2.y = ccdesc.effectiveHeight * 0.5f - ccdesc.radius;
        Vector3 center     = ccdesc.center;
        Vector3 vector3    = ccdesc.OffsetToWorld(center - vector2);
        Vector3 vector4    = ccdesc.OffsetToWorld(center + vector2);
        float   magnitude  = (ccdesc.OffsetToWorld(center + new Vector3(ccdesc.skinnedRadius, 0f, 0f)) - ccdesc.worldCenter).magnitude;
        float   magnitude2 = vector.magnitude;
        float   num        = 1f / magnitude2;
        Vector3 vector5;

        vector5.x = vector.x * num;
        vector5.y = vector.y * num;
        vector5.z = vector.z * num;
        int num2  = 0;
        int layer = base.gameObject.layer;

        for (int i = 0; i < 32; i++)
        {
            if (!Physics.GetIgnoreLayerCollision(layer, i))
            {
                num2 |= 1 << i;
            }
        }
        if (Physics.CapsuleCast(vector3, vector4, magnitude, vector5, magnitude2, num2))
        {
            return(false);
        }
        this.totemicObject.CCDesc.transform.position += vector;
        for (int j = 0; j < this.totemicObject.Configuration.numRequiredTotemicFigures; j++)
        {
            this.totemicObject.TotemicFigures[j].CCDesc.transform.position += vector;
        }
        this.BindPositions(new global::CCTotem.PositionPlacement(this.totemicObject.CCDesc.worldSkinnedBottom, this.totemicObject.CCDesc.worldSkinnedTop, this.totemicObject.CCDesc.transform.position, this.totemicObject.Configuration.poleExpandedHeight));
        return(true);
    }
 // Token: 0x0600197C RID: 6524 RVA: 0x00061D84 File Offset: 0x0005FF84
 internal void DestroyCCDesc(ref global::CCDesc CCDesc)
 {
     if (CCDesc)
     {
         global::CCDesc ccdesc = CCDesc;
         CCDesc = null;
         this.ExecuteBinding(ccdesc, false);
         Object.Destroy(ccdesc.gameObject);
     }
 }
 // Token: 0x0600197D RID: 6525 RVA: 0x00061DB8 File Offset: 0x0005FFB8
 internal void ExecuteBinding(global::CCDesc CCDesc, bool Bind)
 {
     if (CCDesc && !object.ReferenceEquals(this.ConfigurationBinder, null))
     {
         try
         {
             this.ConfigurationBinder(Bind, CCDesc, this.Tag);
         }
         catch (Exception ex)
         {
             Debug.LogException(ex, this);
         }
     }
 }
    // Token: 0x06001846 RID: 6214 RVA: 0x0005B308 File Offset: 0x00059508
    public bool SimpleMove(Vector3 speed)
    {
        global::CCDesc ccdesc = global::CCDesc.s_CurrentMovingCCDesc;
        bool           result;

        try
        {
            global::CCDesc.s_CurrentMovingCCDesc = this;
            result = this.m_Collider.SimpleMove(speed);
        }
        finally
        {
            global::CCDesc.s_CurrentMovingCCDesc = ((!ccdesc) ? null : ccdesc);
        }
        return(result);
    }
Beispiel #5
0
    // Token: 0x06001870 RID: 6256 RVA: 0x0005BF88 File Offset: 0x0005A188
    public static global::CCHitDispatch GetHitDispatch(global::CCDesc CCDesc)
    {
        if (!CCDesc)
        {
            return(null);
        }
        if (!object.ReferenceEquals(CCDesc.AssignedHitManager, null))
        {
            return(CCDesc.GetComponent <global::CCHitDispatch>());
        }
        global::CCHitDispatch component = CCDesc.GetComponent <global::CCHitDispatch>();

        if (component)
        {
            return(component);
        }
        return(CCDesc.gameObject.AddComponent <global::CCHitDispatch>());
    }
        // Token: 0x0600184F RID: 6223 RVA: 0x0005B7C8 File Offset: 0x000599C8
        public Hit(ControllerColliderHit ControllerColliderHit)
        {
            this.CharacterController = ControllerColliderHit.controller;
            global::CCDesc s_CurrentMovingCCDesc = global::CCDesc.s_CurrentMovingCCDesc;

            if (!s_CurrentMovingCCDesc || s_CurrentMovingCCDesc.collider != this.CharacterController)
            {
                this.CCDesc = this.CharacterController.GetComponent <global::CCDesc>();
            }
            else
            {
                this.CCDesc = s_CurrentMovingCCDesc;
            }
            this.Collider      = ControllerColliderHit.collider;
            this.Point         = ControllerColliderHit.point;
            this.Normal        = ControllerColliderHit.normal;
            this.MoveDirection = ControllerColliderHit.moveDirection;
            this.MoveLength    = ControllerColliderHit.moveLength;
        }
    // Token: 0x06001845 RID: 6213 RVA: 0x0005B284 File Offset: 0x00059484
    public CollisionFlags Move(Vector3 motion)
    {
        global::CCDesc ccdesc = global::CCDesc.s_CurrentMovingCCDesc;
        CollisionFlags result;

        try
        {
            global::CCDesc.s_CurrentMovingCCDesc = this;
            if (!object.ReferenceEquals(this.AssignedHitManager, null))
            {
                this.AssignedHitManager.Clear();
            }
            result = this.m_Collider.Move(motion);
        }
        finally
        {
            global::CCDesc.s_CurrentMovingCCDesc = ((!ccdesc) ? null : ccdesc);
        }
        return(result);
    }