
-----------------------------------
DrummaBoyFB
Sat Sep 11, 2010 12:57 pm

Collision Class 2 player game
-----------------------------------
Hi everybody. 
I am in the process of making a game and it's looking pretty good so far, but the problem is that I don't know how to create the collision class. 
The problem is that I set the movement of my players in the variables x and y but I don't know how I can set them apart differently according to each player
so that when they reach close to each other they collide.

Example : If I want Cloud and Axel to collide , I don't know how to do so because both of them use the variable x and y as their movements.
so how do I make the x and y different according to each player?

If you don't understand please tell me and I'll try and explain it in a diffferent way.

Here's my Player Class :



// Player.cpp
#pragma once
#include "Player.h"
#include 
#include 
#include 
#include 

Player::Player (string name , bool player, int StandFrames , int WalkFrames, int AttackFrames,
  int SAFrames, int WeakFrames) {
  wcounter = 0;
  acounter = 0;
  sacounter = 0;
  wecounter = 0;
  player1 = player;
  Name = name;
  walkcounter = 0;
  atkcounter = 0;
  secondcounter = 0;
  weakcounter = 0;
  
  for (int i = 1; i 