forked from s425077/PotatoPlan
64 lines
1023 B
C#
64 lines
1023 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
class Crops
|
|
{
|
|
public int x;
|
|
public int y;
|
|
public int Status;
|
|
private int cropType;
|
|
private int Timer;
|
|
private Random r;
|
|
|
|
|
|
public void updateCrop()
|
|
{
|
|
if (Status != 0)
|
|
{
|
|
Timer--;
|
|
}
|
|
}
|
|
|
|
public int getCropTimer()
|
|
{
|
|
return Timer;
|
|
}
|
|
|
|
public int getCostOnMovement()
|
|
{
|
|
if (Status == 1) //grass
|
|
{
|
|
return 1;
|
|
}
|
|
else if (Status == 2) //dirt
|
|
{
|
|
return 8;
|
|
}
|
|
else if (Status == 3) //crops
|
|
{
|
|
return 15;
|
|
}
|
|
else
|
|
{
|
|
return 30;
|
|
}
|
|
}
|
|
|
|
|
|
public void setPosition(int newx, int newy)
|
|
{
|
|
x = newx;
|
|
y = newy;
|
|
}
|
|
|
|
public void setCropType(int Type)
|
|
{
|
|
|
|
}
|
|
}
|