Example #1
0
File: Robot.cs Project: zpconn/Gas
        public Robot( Renderer renderer, RobotControl control, Scene scene )
            : base(renderer, EntityType.Robot)
        {
            mesh = Mesh.Circle( renderer, Color.White, 60, 24 );
            turret = new Surface( renderer, "turret", new Size( 20, 75 ) );
            this.scene = scene;

            frictionalCoefficient = config.GetSetting<float>( "FrictionalCoefficient" );
            mass = config.GetSetting<float>( "RobotMass" );
            coefficientOfRestitution = config.GetSetting<float>( "CoefficientOfRestitution" );

            projectileFireInterval = config.GetSetting<float>( "ProjectileFireInterval" );
            timeSinceLastProjFire = projectileFireInterval;

            explodingProjFireInterval = config.GetSetting<float>( "ExplodingProjectileFireInterval" );
            timeSinceLastExplodingProjFire = explodingProjFireInterval;

            health = config.GetSetting<int>( "RobotStartHealth" );

            AttachController( control );
        }
Example #2
0
File: Robot.cs Project: zpconn/Gas
 public void AttachController( RobotControl control )
 {
     this.control = control;
     control.AttachToRobot( this );
 }