public override bool Init()
        {
            //_command = _playerMatcher.GetSingleMatch().GetComponent<CommandComp>();
            cc              = engine.FindEntity(Res.Entities.Player).GetComponent <CommandComp>();
            pc              = cc.Owner.GetComponent <PositionComp>();
            rbComp          = cc.Owner.GetComponent <RigidbodyComp>().rigidbody;
            sdc             = cc.GetComponent <ShipComp>();
            cam             = Camera.main;
            invertYAxis     = engine.GetSingle <GameSettingsComp>(ComponentTypes.GameSettingsComp).InvertYAxis;
            TargetingCursor = Resources.Load <Texture2D>("Materials/TargetingCursor");
            cursorMidpoint  = new Vector2(
                TargetingCursor.width / 2f,
                TargetingCursor.height / 2f);

            rbComp.maxAngularVelocity = sdc.CurrentMaxRotationVelocity;

            return(true);
        }
Example #2
0
 public override bool Init()
 {
     _command = _playerMatcher.GetSingleMatch().GetComponent <CommandComp>();
     player   = ReInput.players.GetPlayer(0);
     return(true);
 }
 public override bool Init()
 {
     playerCommand = engine.FindEntity(Res.Entities.Player).GetComponent <CommandComp>();
     return(true);
 }