コード例 #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);
    }
コード例 #2
0
 public void UpdateRest()
 {
     _restTransform = new TransformContainer();
     _restTransform.copyFrom(transform);
 }