Пример #1
0
    public void NewCentipedeHead(GameObject head)
    {
        _head = head;

        var position = _head.transform.position;

        _targetPosition = position;
        LastPosition    = position;

        HorizontalDirection = HorizontalDirection.Right;
        VerticalDirection   = VerticalDirection.Up;

        _levelManager.SetCentipedeCell(new IntVector2((int)position.x, (int)position.y));

        _canMove = true;
    }
Пример #2
0
    public void Init(GameObject tail, IBodyPart leader, int index)
    {
        _tail      = tail;
        _tailIndex = index;

        Vector2 position = _tail.transform.position;

        LastPosition      = position;
        _leaderGameObject = leader;

        _levelManager = GameClient.Get <ILevelManager>();
        _levelManager.SetCentipedeCell(new IntVector2((int)LastPosition.x, (int)LastPosition.y));
    }