Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Access of possibly undefined property isKeyJump through a reference with static type Function.
- public static var isKeyRight:Boolean = false;
- public function Cont()
- {
- Cont.isKeyRight = false;
- ... }
- if (standing && Cont.isKeyJump) vacc = _jumpAcc;
- package {
- import flash.display.MovieClip;
- import flash.events.Event;
- public class PersonnagePrincipal extends Physical {
- //INITIALISATION
- ...
- //CONSTRUCTOR
- public function PersonnagePrincipal(life:Number = 100, focus:Number = 100, lifeMax:Number = 100, focusMax:Number = 100)
- {
- super();
- ...
- }
- // GET & SET
- public function set life(life:Number):void { _life = (life > lifeMax) ? lifeMax : life; }
- ...
- // UPDATE
- override public function update(event:Event)
- {
- move_physical();
- if (standing && Cont.isKeyJump) vacc = _jumpAcc;
- ...
- package {
- import flash.events.Event;
- import flash.events.KeyboardEvent;
- import flash.ui.Keyboard;
- import flash.display.MovieClip;
- import flash.utils.*;
- public class Cont extends MovieClip
- {
- // Key codes
- public static var isKeyRight:Boolean;
- public static var isKeyJump:Boolean;
- ...
- //CONSTRUCTOR
- public function Cont()
- {
- Cont.isKeyRight = false;
- Cont.isKeyJump = false;
- ...
- if (stage) { init(); }
- else { this.addEventListener(Event.ADDED_TO_STAGE, init); }
- }
- //POST-CONSTRUCTOR
- private function init(e:Event=null)
- {
- this.removeEventListener(Event.ADDED_TO_STAGE, init);
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement