Example #1
0
 public void SetProperties(int row, int col, Vector2 pos, ColorsBall color, StatusBall status)
 {
     m_row    = row;
     m_col    = col;
     m_pos    = pos;
     m_color  = color;
     m_status = status;
     if (m_color == ColorsBall.ghost)
     {
         m_type = TypesBall.GHOST;
     }
     else
     {
         m_type = TypesBall.NORMAL;
     }
 }
Example #2
0
    public GameObject NewBall(int row, int col, Vector2 pos, ColorsBall color, StatusBall status)
    {
        switch (color)
        {
        case ColorsBall.blue:
            return(Instantiate(BlueBallPrefab, new Vector3(pos.x, pos.y, 0.0f), Quaternion.identity));

            break;

        case ColorsBall.boxdeaux_red:
            return(Instantiate(BoxdeauxRedBallPrefab, new Vector3(pos.x, pos.y, 0.0f), Quaternion.identity));

            break;

        case ColorsBall.cyan:
            return(Instantiate(CyanBallPrefab, new Vector3(pos.x, pos.y, 0.0f), Quaternion.identity));

            break;

        case ColorsBall.ghost:
            return(Instantiate(GhostBallPrefab, new Vector3(pos.x, pos.y, 0.0f), Quaternion.identity));

            break;

        case ColorsBall.green:
            return(Instantiate(GreenBallPrefab, new Vector3(pos.x, pos.y, 0.0f), Quaternion.identity));

            break;

        case ColorsBall.pink:
            return(Instantiate(PinkBallPrefab, new Vector3(pos.x, pos.y, 0.0f), Quaternion.identity));

            break;

        case ColorsBall.red:
            return(Instantiate(RedBallPrefab, new Vector3(pos.x, pos.y, 0.0f), Quaternion.identity));

            break;

        case ColorsBall.yellow:
            return(Instantiate(YellowBallPrefab, new Vector3(pos.x, pos.y, 0.0f), Quaternion.identity));

            break;
        }
        return(null);
    }
Example #3
0
 public void SetStatus(StatusBall status)
 {
     m_status = status;
 }