Esempio n. 1
0
    void Awake()
    {
        _directionsList = new List <IndexDirection2>();
        foreach (IndexDirection2.DirectionEnum dir in _directions)
        {
            _directionsList.Add(IndexDirection2.FromDirectionEnum(dir));
        }

        PushingEnabled = true;
    }
Esempio n. 2
0
    void Start()
    {
        _enemyMove.Mode = EnemyMove.MovementMode.Destination;
        _enemyMove.AlwaysFaceTowardsMoveDirection  = false;
        _enemyMove.targetPositionReached_Callback += OnTargetPositionReached;

        _forwardTileDirection = IndexDirection2.FromDirectionEnum(forwardDirection);
        transform.forward     = _forwardTileDirection.ToVector3();
        MoveDirection_Tile    = _forwardTileDirection;
    }
Esempio n. 3
0
    void InitPasswordLock()
    {
        List <LostSectorPortal> solutionPortals = new List <LostSectorPortal>();

        foreach (IndexDirection2.DirectionEnum d in _solution)
        {
            IndexDirection2  dir    = IndexDirection2.FromDirectionEnum(d);
            LostSectorPortal portal = DirectionToPortal(dir);
            solutionPortals.Add(portal);
        }
        _passwordLock = new PasswordLock(solutionPortals.ToArray());

        _passwordLock.CorrectEntryCallback           += OnCorrectEntryAddedToSequence;
        _passwordLock.IncorrectEntryCallback         += OnIncorrectEntryAddedToSequence;
        _passwordLock.CorrectPasswordEnteredCallback += OnSequenceCompleted;
    }