Пример #1
0
    // Use this for initialization
    void Start()
    {
        m_animator   = GetComponent <Animator>();
        m_startScale = transform.localScale;

        m_startPos = m_moveObject.position;

        m_broom    = GetComponentInChildren <PlayerBroom>();
        m_broomCol = m_broom.GetComponent <Collider>();

        asource = GetComponent <AudioSource>();

        Cursor.visible = false;

        var main = psKillcount.main;

        psKillcountStartColor = main.startColor.color;

        rends          = GetComponentsInChildren <Renderer>();
        rendStartColor = rends[0].material.GetColor("_Color");

        //Time.timeScale = 0.2f;
        if (m_ccedParticle)
        {
            JEffectPool.CreatePool(m_ccedParticle, 5);
        }

        StartCoroutine(InitGame());
        StartCoroutine(KillCountChecker());
    }
Пример #2
0
    // Use this for initialization
    void Awake()
    {
        if (killCountText == null)
        {
            killCountText = GameObject.FindGameObjectWithTag("KillCount").GetComponent <Text>();
        }

        m_currHealth = m_maxHealth;

        if (m_deathParticle)
        {
            JEffectPool.CreatePool(m_deathParticle, 10);
        }

        m_immortal = false;

        m_killedbyPlayer = false;
    }