Пример #1
0
 override public void RemoveDetector(InteractionDetector detector)
 {
     if (originalItem != null)
     {
         originalItem.RemoveDetector(detector);
     }
 }
    // Use this for initialization
    void Start()
    {
        player = transform.GetComponent <Player> ();
        if (player == null)
        {
            throw new UnityException("No Player found in Interaction Manager");
        }

        guiManager = player.GetGUIManager();
        if (guiManager == null)
        {
            throw new UnityException("No GUIManager found in Interaction Manager");
        }

        detector = player.GetDetector();
        if (detector == null)
        {
            throw new UnityException("No Interaction Detector set in Interaction Manager");
        }

        playerController = player.GetPlayerController();
        if (playerController == null)
        {
            throw new UnityException("No Player Controller set in Interaction Manager");
        }

        listController = new ListController(guiManager);
    }
Пример #3
0
 private void Awake()
 {
     noPlayerPhases      = GameObject.Find("Managers").GetComponent <GameManager>().noPlayerPhases;
     playerController    = Player.GetComponent <PlayerController>();
     footStepsScript     = Player.GetComponent <footSteps>();
     interactionDetector = GameObject.Find("Input").GetComponent <InteractionDetector>();
     animator            = Player.GetComponent <Animator>();
 }
Пример #4
0
 private void Start()
 {
     camera                 = Camera.main;
     inventory              = Inventory.GetInstance();
     intDetector            = InteractionDetector.GetInstance();
     weaponSwapDelaySeconds = new WaitForSeconds(weaponSwapDelay);
     firing                 = false;
 }
Пример #5
0
    void Start()
    {
        playerRigidbody      = GetComponent <Rigidbody>();
        interactableDetector = GetComponentInChildren <InteractionDetector>();
        customGravity        = GetComponent <CustomGravity>();

        InvokeRepeating("GroundCheck", 0, checkRateForGround);
    }
    private void Awake()
    {
        gamePausing         = GameObject.Find("Managers").GetComponent <GamePausing>();
        interactionDetector = GameObject.Find("Input").GetComponent <InteractionDetector>();

        propsCam.enabled = false;
        UIprops.SetActive(false);
        UImain.SetActive(true);
    }
Пример #7
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Пример #8
0
    protected override void DoAwake()
    {
        // Debug.Log("PlayerInputDefaultState.DoAwake()");
        base.DoAwake();

        movement            = GetComponentInChildren <PlayerMovement>();
        playerView          = GetComponentInChildren <PlayerView>();
        interactionDetector = GetComponentInChildren <InteractionDetector>();
        pickupHolder        = GetComponentInChildren <PickupHolder>();
        photo = GetComponentInChildren <Photo>();

        // gameStateMachine = FindObjectOfType<GameStateTitleScreen>().GetComponent<StateMachine>();

        EventBus.Subscribe <EnterTitleScreenEvent>(e => canPause                = false);
        EventBus.Subscribe <PhotoLoweredAtStartEvent>(e => canPause             = true);
        EventBus.Subscribe <ObjectiveCompletedCutsceneStartEvent>(e => canPause = false);
        EventBus.Subscribe <ObjectiveCompletedCutsceneEndEvent>(e => canPause   = true);
        EventBus.Subscribe <PlayerHasWonEvent>(e => canPause = false);
    }
Пример #9
0
 private void Start()
 {
     interactionDetector = GetComponent <InteractionDetector>();
     EventBus.Subscribe <DropItemTriggerEvent>(OnDropItemTriggerEvent);
 }
Пример #10
0
 virtual public void RemoveDetector(InteractionDetector detector)
 {
     this.detector = null;
 }
Пример #11
0
 virtual public void AddDetector(InteractionDetector detector)
 {
     this.detector = detector;
 }
Пример #12
0
 virtual protected void Start()
 {
     detector   = null;
     actionList = new ActionList(false);
 }