// Start is called before the first frame update void Start() { player = GameObject.FindGameObjectWithTag("Player"); myHealth = new HealthSystem((int)hitPoints); myDrop = new DropMechanics(1, 0, true); moveToPos = new Vector3(); //starting movement randMove(); }
public ChestMechanic(Sprite openSprite, GameObject myObject, float coinLow, float coinHigh, float gemLow, float gemHigh) { this.openSprite = openSprite; this.myObject = myObject; this.coinLow = coinLow; this.coinHigh = coinHigh; this.gemLow = gemLow; this.gemHigh = gemHigh; myDrop = new DropMechanics((int)Random.Range(coinLow, coinHigh), (int)Random.Range(gemLow, gemHigh), false); }
// Start is called before the first frame update void Start() { player = GameObject.FindGameObjectWithTag("Player"); myHealth = new HealthSystem((int)hitPoints); myDrop = new DropMechanics(2, 0, false); }