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; } }
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; } }
private void BindPosition(ref CCTotem.PositionPlacement placement) { this.tr.position = placement.bottom; this.LastPositionPlacement = new CCTotem.PositionPlacement?(placement); }
private static void OnBindPosition(ref CCTotem.PositionPlacement PositionPlacement, object Tag) { CCMotor tag = (CCMotor)Tag; if (tag) { tag.BindPosition(ref PositionPlacement); } }
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); }