Ejemplo n.º 1
0
    public override void Move(LevelMoment next, LevelMoment prev, Lemming lemming, GameBlock block)
    {
        Vector3Int i = block.pos;

        if (fade > '0')
        {
            next.level[i.x, i.y, i.z] = fade;
        }
        else
        {
            next.level[i.x, i.y, i.z] = GameBoardCubeDictionary.OPEN_CUBE;
        }

        lemming.Turn();
    }
Ejemplo n.º 2
0
    public override void Move(LevelMoment next, LevelMoment prev, Lemming lemming, GameBlock block)
    {
        Lemming check = null;

        foreach (Lemming lem in prev.lemmings)
        {
            if (check != null)
            {
                break;
            }
            if (lem.position == block.pos)
            {
                check = lem;
            }
        }

        foreach (Lemming lem in prev.phasedLemmings)
        {
            if (check != null)
            {
                break;
            }
            if (lem.position == block.pos)
            {
                check = lem;
            }
        }

        if (check != null)
        {
            Vector3Int test = check.direction * -1;
            if (lemming.direction == test)
            {
                if (check.position.y > 0)
                {
                    char below = prev.level[check.position.x, check.position.y - 1, check.position.z];
                    if ((below != GameBoardCubeDictionary.OPEN_CUBE) && (below != GameBoardCubeDictionary.NEGA_CUBE))
                    {
                        lemming.Turn();
                        return;
                    }
                }
            }
        }

        lemming.position = block.pos;
    }
Ejemplo n.º 3
0
    public override void Move(LevelMoment next, LevelMoment prev, Lemming lemming, GameBlock block)
    {
        Lemming check = null;

        foreach (Lemming lem in next.lemmings)
        {
            if (check != null)
            {
                break;
            }
            if (lem.position == block.pos)
            {
                check = lem;
            }
        }

        foreach (Lemming lem in next.phasedLemmings)
        {
            if (check != null)
            {
                break;
            }
            if (lem.position == block.pos)
            {
                check = lem;
            }
        }

        if (check != null)
        {
            lemming.Turn();
            return;
        }

        lemming.position = block.pos;
    }
 public override void Move(LevelMoment next, LevelMoment prev, Lemming lemming, GameBlock block)
 {
     lemming.Turn();
 }