Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
 public void UpdateRest()
 {
     _restTransform = new TransformContainer();
     _restTransform.copyFrom(transform);
 }