Example #1
0
        private void DeleteAllFiguresAndClearScript()
        {
            CCTotemPole script = this.Script;

            this.Script = null;
            for (int i = this.Configuration.numRequiredTotemicFigures - 1; i >= 0; i--)
            {
                CCTotem.TotemicFigure totemicFigures = this.TotemicFigures[i];
                if (!object.ReferenceEquals(totemicFigures, null))
                {
                    if (totemicFigures.TotemPole != this)
                    {
                        this.TotemicFigures[i] = null;
                    }
                    else
                    {
                        this.TotemicFigures[i].Delete(script);
                    }
                }
            }
            CCTotem.DestroyCCDesc(script, ref this.CCDesc);
            if (script && object.ReferenceEquals(script.totemicObject, this))
            {
                script.totemicObject = null;
            }
        }
Example #2
0
        internal void Delete(CCTotemPole OwnerScript)
        {
            CCTotemicFigure script = this.Script;

            this.Script = null;
            if (script && object.ReferenceEquals(script.totemicObject, this))
            {
                script.totemicObject = null;
            }
            CCTotem.DestroyCCDesc(OwnerScript, ref this.CCDesc);
            if (script)
            {
                UnityEngine.Object.Destroy(script.gameObject);
            }
            if (object.ReferenceEquals(this.TotemPole.TotemicFigures[this.BottomUpIndex], this))
            {
                this.TotemPole.TotemicFigures[this.BottomUpIndex] = null;
            }
        }
Example #3
0
 private void BindPosition(ref CCTotem.PositionPlacement placement)
 {
     this.tr.position = placement.bottom;
     this.LastPositionPlacement = new CCTotem.PositionPlacement?(placement);
 }
Example #4
0
 private static void OnBindPosition(ref CCTotem.PositionPlacement PositionPlacement, object Tag)
 {
     CCMotor tag = (CCMotor)Tag;
     if (tag)
     {
         tag.BindPosition(ref PositionPlacement);
     }
 }
Example #5
0
 private void BindPositions(ref CCTotem.PositionPlacement placement, object Tag)
 {
     base.transform.position = placement.bottom;
     this.fpsCam.transform.position = placement.top - new Vector3(0f, 0.25f, 0f);
 }