Пример #1
0
    void Awake()
    {
        // Scale settings from non-retarded lvls to, well.. Yeah...
        m_speed           *= 100;
        m_dashSpeed       *= 100;
        m_laneSwitchSpeed *= 100;
        m_screamForce     *= 100;

        m_gameOverseer = FindObjectOfType <GameOverseer>();


        m_dashDistance = GameSettings.m_distanceBetweenSquares * m_dashDistance;

        m_leftLanePos   = new Vector2(-GameSettings.m_distanceBetweenSquares, 0);
        m_rightLanePos  = new Vector2(GameSettings.m_distanceBetweenSquares, 0);
        m_middleLanePos = Vector2.zero;

        m_screamBox   = FindObjectOfType <ScreamBox>();
        m_rigidbodies = GetComponentsInChildren <Rigidbody>();
        m_colliders   = GetComponentsInChildren <Collider>();

        Lanes = new Dictionary <int, Vector2>();
        Lanes.Add(0, m_leftLanePos);
        Lanes.Add(1, m_middleLanePos);
        Lanes.Add(2, m_rightLanePos);
        m_animator  = GetComponent <Animator>();
        m_rigidbody = GetComponent <Rigidbody>();
        m_collider  = GetComponent <Collider>();
        DisableRagdoll();
    }
Пример #2
0
 private void Awake()
 {
     instance = this;
     if (!player)
     {
         player = GameObject.FindObjectOfType <PlayerStats>();
     }
 }
Пример #3
0
    private void Awake()
    {
        instance = this;
        if (allTimeMangedObjectDictionary == null)
        {
            InitializeTimeList();
        }

        AddObjectToDontDestroyOnLoad(this.gameObject);
    }
Пример #4
0
    void Start()
    {
        m_Overseer = GetComponent <GameOverseer>();
        if (!m_Overseer)
        {
            Debug.Log("Score keeper cannot find game-overseer!");
            enabled = false;
            return;
        }

        m_CurrentPos = transform.position;
    }
Пример #5
0
    void Awake()
    {
        m_gameOverseer = FindObjectOfType <GameOverseer>();

        m_rigidbody = GetComponent <Rigidbody>();
        m_collider  = GetComponent <Collider>();

        m_colliders   = GetComponentsInChildren <Collider>();
        m_rigidbodies = GetComponentsInChildren <Rigidbody>();

        DisableRagdoll();
    }
    //*****METHODS*****

    private void Awake()
    {
        //Do I exist?
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(this.gameObject);
        }
        DontDestroyOnLoad(this);

        UIElements = new List <GameObject>();
    }
Пример #7
0
 private void Awake()
 {
     instance = this;
 }
Пример #8
0
 private void Awake()
 {
     instance = this;
     GameOverseer.FRAME_COUNT    = 0;
     Application.targetFrameRate = TARGET_FRAME_RATE;
 }