source: 2016/23/ohjaajat/Punasininen/Punasininen/Punasininen/WeaponCrate.cs @ 7211

Revision 7211, 939 bytes checked in by sieerinn, 5 years ago (diff)

Aseita ja tähtääminen

Line 
1using System;
2using System.Collections.Generic;
3using Jypeli;
4using Jypeli.Assets;
5using Jypeli.Controls;
6using Jypeli.Effects;
7using Jypeli.Widgets;
8
9class WeaponCrate : PhysicsObject
10{
11    public WeaponCrate(double leveys, double korkeus)
12        : base(leveys, korkeus)
13    {
14        Tag = "crate";
15    }
16}
17
18class ColorGun : Weapon
19{
20    public Player Owner;
21
22    public Game MyGame;
23
24    protected override PhysicsObject CreateProjectile()
25    {
26        Grenade test = new Grenade(10, TimeSpan.FromSeconds(1));
27        test.Explosion.ShockwaveColor = Owner.Color;
28        return test;
29    }
30
31    public ColorGun(double leveys, double korkeus, Image image, Player owner, Game game)
32        : base(leveys, korkeus)
33    {
34        Image = image;
35        AttackSound = null;
36        FireRate = 1;
37        Power.DefaultValue = 15000;
38        Owner = owner;
39        MyGame = game;
40       
41    }
42}
Note: See TracBrowser for help on using the repository browser.