コード例 #1
0
    /// <summary>
    /// Initialises this instance.
    /// </summary>
    public void Init()
    {
        // Reset map destroy state
        if (_map.DestroyMode)
        {
            _map.ToggleDestroyMode();
        }

        // Initialise object
        _go              = Instantiate(Target, _map.GetTileParent(Target).transform);
        _defaultColour   = Color.white;
        _currentRotation = Quaternion.identity;

        // Set alpha
        _spriteRenderers = _go.GetComponentsInChildren <SpriteRenderer>();
        ToggleAlpha();
    }