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

        lineOfSightLayerMask = LayerMask.GetMask("Player", "Walls", "Doors");
        playerLayer          = LayerMask.NameToLayer("Player");
        doorsLayer           = LayerMask.NameToLayer("Doors");
    }
示例#3
0
    // 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;
    }
示例#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;
    }
示例#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);
 }
示例#6
0
 private void Awake()
 {
     timeTravel = FindObjectOfType <TimeTravel>();
 }
示例#7
0
 void Awake()
 {
     timeTravel = GetComponent <TimeTravel>();
 }