예제 #1
0
    // 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();
    }
예제 #2
0
    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);
    }
예제 #3
0
 // 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);
 }