Example #1
0
int main()
{
	float myValue = 0.0f;

	Calculator();					// Object Constructor
	Calculator(0.0, 0.0);
	Calculator myCal(1.0, 2.0, '*');
	myValue = CalculatorInAction(3.0,4.0,'+');
	Calculator(myValue,myValue);

	return 0;
}
Example #2
0
void Bullet::ShotController(VECTOR start,VECTOR target)
{
    if (counter % 10 == 0)
    {
        for (j = 0; j < BULLET; j++)
        {
            if (bullet[j] == 2 & bulletLocation[j].z < -50 & bulletLocation[j].z > -150)
            {
                Calculator(j, bulletLocation[j], target);
            }
        }
    }

    for (j = 0; j < BULLET; j++)
    {
        if (bullet[j]==1 | bullet[j]==2 | bullet[j]==3)
        {
            //現在位置のベクトルに移動ベクトルを加算
            bulletLocation[j] = VAdd(bulletLocation[j], move[j]);
        }

        if (bulletLocation[j].z < -210.0f | bulletLocation[j].z > 10.0f)
        {
            bullet[j] = 0;
        }
    }
}
Example #3
0
void Bullet::HomingShot(VECTOR start, VECTOR target, Enemy* enemy)
{
    if (enemy->GetMp()>10)
    {
        if (enFlag == 2)
        {
            if (bullet[i] == 0)
            {
                //使用されていないバレット配列のフラグをたてていく
                bullet[i] = 2;
                isGraze[i] = 0;
                Calculator(i, start, target);
                isShot = -5;
                enemy->AddMp(-10);
            }
            i++;
            if (i == BULLET - 1)
            {
                i = 0;
            }
        }
    }
}
Example #4
0
void Bullet::HomingShot(VECTOR start, VECTOR target, Player* player)
{
    if (player->GetMp()>10)
    {
        if (key & PAD_INPUT_2)
        {
            if (bullet[i] == 0)
            {
                //使用されていないバレット配列のフラグをたてていく
                bullet[i] = 2;
                isGraze[i] = 0;
                Calculator(i, start, target);
                isShot = -5;
                player->AddMp(-5);
            }
            i++;
            if (i == BULLET - 1)
            {
                i = 0;
            }
        }
    }
}
Example #5
0
void Bullet::SuperShot(VECTOR start, VECTOR target, Enemy* enemy)
{
    if (enemy->GetMp()>20)
    {
        if (enFlag==3)
        {
            if (bullet[i] == 0)
            {
                //使用されていないバレット配列のフラグをたてていく
                bullet[i] = 3;
                isGraze[i] = 0;
                Calculator(i, start, target);
                move[i] = VScale(move[i], 1.5f);
                isShot = -15;
                enemy->AddMp(-20);
            }
            i++;
            if (i == BULLET - 1)
            {
                i = 0;
            }
        }
    }
}
Example #6
0
void Bullet::SuperShot(VECTOR start, VECTOR target, Player* player)
{
    if (player->GetMp()>20)
    {
        if (key & PAD_INPUT_3)
        {
            if (bullet[i] == 0)
            {
                //使用されていないバレット配列のフラグをたてていく
                bullet[i] = 3;
                isGraze[i] = 0;
                Calculator(i, start, target);
                move[i] = VScale(move[i], 1.5f);
                isShot = -15;
                player->AddMp(-20);
            }
            i++;
            if (i == BULLET - 1)
            {
                i = 0;
            }
        }
    }
}
Example #7
0
int main(){
    Calculator c = Calculator();
    c.cal();
    
    return 0;
}