public Collision(Canvas c, Window w, Food f, Snake s, Satellites sat) { food = f; snake = s; satellites = sat; snake.update(); canvas = c; }
public MainGame() { // form1 = creatingForm; // snake.setSuperForm = setCreatingForm; //snake.setCreatingForm = this; InitializeComponent(); food = new Food(canvas, this); satellites = new Satellites(canvas, this); snake = new Snake(canvas, form1); //start Timer gameTimer.Tick += GameTimer_Tick; gameTimer.Interval = new TimeSpan(0, 0, 0, 0, 1); //fps gameTimer.Start(); //start music gamesound.Open(new Uri("GameMusicCrabRave.mp3", UriKind.Relative)); gamesound.Volume = (100); gamesound.Play(); }