public PrototypeHolder()
 {
     PlayerClonableObject     = new Player();
     FoodClonableObject       = new Food();
     ObstacleClonableObject   = new Obstacle();
     TimeTravelClonableObject = new TimeTravel();
 }
Example #2
0
    private void Awake()
    {
        timeTravel = FindObjectOfType <TimeTravel>();

        lineOfSightLayerMask = LayerMask.GetMask("Player", "Walls", "Doors");
        playerLayer          = LayerMask.NameToLayer("Player");
        doorsLayer           = LayerMask.NameToLayer("Doors");
    }
    // Retrieves the players rigidbody so that we can move it.
    private void Awake()
    {
        GameObject GameManager = GameObject.Find("GameManager");

        time = GameManager.GetComponent <TimeTravel>();

        anim = GetComponent <Animator>();

        _playerRB = GetComponent <Rigidbody2D>();
        isDead    = false;
    }
Example #4
0
    private void Awake()
    {
        pastPlayerLayer = LayerMask.GetMask("PastPlayer");

        physicsCollisionCollider = GetComponentInChildren <Collider>();
        rigidbody  = GetComponent <Rigidbody>();
        timeTravel = FindObjectOfType <TimeTravel>();
        interactableObjectsLayerMask = LayerMask.GetMask("Interactable");
        ui = FindObjectOfType <UI>();

        var soundIndicatorTransform = transform.Find("SoundIndicator");

        soundIndicatorTransform.localScale = new Vector3(runningSoundWaveRadius * 2, 1, runningSoundWaveRadius * 2);
        soundIndicator = soundIndicatorTransform.gameObject;
    }
Example #5
0
 private void Awake()
 {
     movement = GetComponent <PlayerMovementN>(); //Setup reference for the PlayerMovement script;
     travel   = GetComponent <TimeTravel>();      //Setup reference for the PlayerMovement script;
     DebugInfo.SetActive(false);
 }
Example #6
0
 private void Awake()
 {
     timeTravel = FindObjectOfType <TimeTravel>();
 }
Example #7
0
 void Awake()
 {
     timeTravel = GetComponent <TimeTravel>();
 }