Beispiel #1
0
 public IMoveStrategy(ref MovementProps props, ref MovementAttr attr, Player player)
 {
     this.props             = props;
     this.player            = player;
     this.rayCastController = player.RayCastController;
     this.attr = attr;
 }
 // Use this for initialization
 void Start()
 {
     joystick   = InputManager.ActiveDevice;
     RCC        = gameObject.GetComponent <RayCastController> ();
     charScript = gameObject.GetComponent <Character> ();
     pnce       = gameObject.GetComponent <Pounce> ();
 }
Beispiel #3
0
    public virtual void Initialize(Entity owner)
    {
        Owner       = owner;
        MyBody      = GetComponent <Rigidbody2D>();
        BoxCollider = GetComponent <BoxCollider2D>();

        RayController = new RayCastController(this);
    }
 // Use this for initialization
 void Start()
 {
     isTurningRight = false;
     isTurningLeft  = false;
     hasTurned      = false;
     RCC            = GameObject.Find("Player").GetComponent <RayCastController> ();
     counter        = 0;
 }
Beispiel #5
0
    // Use this for initialization
    void Start()
    {
        RCC = gameObject.GetComponent <RayCastController> ();

        isImmobile = false;
        size       = transform.localScale;
        canMove    = false;
        isJumping  = false;
        isDead     = false;
    }
Beispiel #6
0
 public Movement(Player player, MovementAttr stats) : base(player)
 {
     this.attr           = stats;
     rayCastController   = player.RayCastController;
     props               = new MovementProps( );
     basicMove           = new BasicMoveStrategy(ref props, ref stats, player);
     spaceMove           = new SpaceMoveStrategy(ref props, ref stats, player);
     slideMove           = new SlideMoveStrategy(ref props, ref stats, player);
     strategy            = basicMove;
     props.originGravity = player.Rb.gravityScale;
 }
Beispiel #7
0
 void Start()
 {
     MF             = GameObject.Find("GameManager").GetComponent <MouseFinder> ();
     TL             = GameObject.Find("GameManager").GetComponent <TestLevel> ();
     rb             = gameObject.GetComponent <Rigidbody2D> ();
     Char           = gameObject.GetComponent <Character> ();
     RCc            = gameObject.GetComponent <RayCastController> ();
     OriPos         = new Vector2(0, 0);
     rightBeingUsed = false;
     powerVal       = 7;
     isIncreasing   = false;
     Char.canJump   = true;
     lastPos        = Vector2.zero;
 }
 // Use this for initialization
 void Start()
 {
     isTurning = false;
     hasTurned = false;
     RCC       = GameObject.Find("Player").GetComponent <RayCastController> ();
 }
Beispiel #9
0
 private void Start()
 {
     rayCastController = GetComponent <RayCastController>();
 }