Exemplo n.º 1
0
    public override bool Activate(WorldThing worldThing)
    {
        if (CanActivateWith(worldThing))
        {
            switch (worldThing.type)
            {
            case WorldThing.Type.Field:
                if (full)
                {
                    full = false;
                    worldThing.Absorb(WorldThing.Resource.Water);
                }

                break;

            case WorldThing.Type.Fire:
                if (full)
                {
                    full = false;
                    worldThing.Absorb(WorldThing.Resource.Water);
                }

                break;

            case WorldThing.Type.River:
                full = true;
                break;

            default:
                break;
            }
        }

        return(false); // not exhausted
    }
Exemplo n.º 2
0
    public override bool Activate(WorldThing worldThing)
    {
        if (CanActivateWith(worldThing))
        {
            switch (worldThing.type)
            {
            case WorldThing.Type.Buyer:
                worldThing.Absorb(WorldThing.Resource.Plant);
                return(true);

            default:
                break;
            }
        }

        return(false);
    }
Exemplo n.º 3
0
    public override bool Activate(WorldThing worldThing)
    {
        if (CanActivateWith(worldThing))
        {
            switch (worldThing.type)
            {
            case WorldThing.Type.Field:
                worldThing.Absorb(WorldThing.Resource.ClassicalMusic);
                return(false);

            default:
                break;
            }
        }

        return(false);
    }
Exemplo n.º 4
0
    public override bool Activate(WorldThing worldThing)
    {
        if (CanActivateWith(worldThing))
        {
            switch (worldThing.type)
            {
            case WorldThing.Type.Field:
                worldThing.Absorb(WorldThing.Resource.Seeds);
                return(true);

            case WorldThing.Type.Fire:
                return(true);    // destroyed you idiot

            default:
                break;
            }
        }

        return(false); // not exhausted
    }