Ejemplo n.º 1
0
    void Awake()
    {
        var components = GetComponents <MonoBehaviour>();

        mainCamera     = (IMainCamera)components.FirstOrDefault(x => x is IMainCamera);
        physicsControl = (IPhysicsControl)components.FirstOrDefault(x => x is IPhysicsControl);
    }
Ejemplo n.º 2
0
 public PlayerMovement(
     IPlayer player,
     IPlayerSettings playerSettings,
     IInputManager inputManager,
     IMainCamera mainCamera)
 {
     this.player         = player;
     this.playerSettings = playerSettings;
     this.inputManager   = inputManager;
     this.mainCamera     = mainCamera;
 }
Ejemplo n.º 3
0
 private void Awake() => camera = GameObject.FindWithTag(Tags.MainCamera).GetComponent <IMainCamera>();
Ejemplo n.º 4
0
 private void Awake()
 {
     camera         = GameObject.FindWithTag(Tags.MainCamera).GetComponent <IMainCamera>();
     spriteRenderer = GetComponent <SpriteRenderer>();
 }