public void Init() { _collidedObjectsSet = new HashSet <GameObject>(); restTransform = new TransformContainer(); restTransform.copyFrom(transform); controller = GetComponent <MovableObjectController>(); _renderer = GetComponent <Renderer>(); _collider = GetComponent <Collider>(); _defaultMaterial = _renderer.sharedMaterial; IsActive = false; if (!manager) { manager = FindObjectOfType <MovableObjectManager>(); } manager.Register(this); }
public void UpdateRest() { _restTransform = new TransformContainer(); _restTransform.copyFrom(transform); }