Exemple #1
0
    public bool MoveTo(MoveNormal nor, UINumber forwardNum)
    {
        MergeNumber = 0;
        switch (nor)
        {
        case MoveNormal.Up:
            moveToUP(forwardNum);
            break;

        case MoveNormal.Down:
            moveToDown(forwardNum);
            break;

        case MoveNormal.Left:
            moveToLeft(forwardNum);
            break;

        case MoveNormal.Right:
            moveToRight(forwardNum);
            break;
        }
        if (GotoPos.Equals(CurPos))
        {
            return(false);
        }
        StartCoroutine(Moving(forwardNum));
        Father.RemoveEmptyPos(GotoPos);
        Father.AddEmptyPos(CurPos);
        return(true);
    }
Exemple #2
0
        public bool Equals(Quest q)
        {
            if (q is null)
            {
                return(false);
            }

            if (ReferenceEquals(this, q))
            {
                return(true);
            }

            return(QuestType.Equals(q.QuestType) && Players.SequenceEqual(q.Players) && Pos1.Equals(q.Pos1) &&
                   Pos2.Equals(q.Pos2) && QuestTime.Equals(q.QuestTime) && QuestText.Equals(q.QuestText) &&
                   Stage.Equals(q.Stage));
        }