コード例 #1
0
    protected override void OnCantMove <T>(T component)
    {
        Wall1 hitWall = component as Wall1;

        hitWall.DamageWall(wallDamage);
        animator.SetTrigger("playerChop");
    }
コード例 #2
0
 public CarGame()
 {
     InitializeComponent();
     Wall1.BringToFront();
     Wall2.BringToFront();
     Wall3.BringToFront();
     Restart.BringToFront();
     Exist.BringToFront();
 }
コード例 #3
0
            public static Point getPos(int row, int column)
            {
                Point pos           = new Point();
                int   row_rest_by_2 = (row % 2);
                int   leftShift     = ((1 - row_rest_by_2) * Wall1.getWallSize().Height / 2);
                int   topShift      = -row_rest_by_2 * (Wall1.getWallSize().Height + Wall1.getWallSize().Width) / 2;

                pos.X = column * Wall1.getWallSize().Height + leftShift;
                pos.Y = ((row + 1) / 2) * (Wall1.getWallSize().Height + Wall1.getWallSize().Width) + topShift;
                return(pos);
            }