Ejemplo n.º 1
0
        //-------------------------------------------------------------------------
        public void create(CRenderScene scene, CRenderTurret render_turret)
        {
            mScene        = scene;
            mRenderTurret = render_turret;
            mRenderTurret.getTurretId();

            _initTurretBase();
            _initTurretTop();
            _initTurretBarrel();
            _initTurretBlaze();

            _setTrigger(true);
            mTkMaterial   = GameObject.Instantiate(Resources.Load(mTkMaterialName)) as UnityEngine.Material;
            mGlowMaterial = GameObject.Instantiate(Resources.Load(mGlowMaterialName)) as UnityEngine.Material;

#if UNITY_EDITOR
            mTurretBaseSprite.gameObject.name   = "TkSpriteTurret";
            mTurretTopSprite.gameObject.name    = "TkSpriteTurret";
            mTurretBlazeSprite.gameObject.name  = "TkSpriteTurret";
            mTurretBarrelSprite.gameObject.name = "TkSpriteTurret";
#endif

            if (mRenderTurret.isMyTurret())
            {
                startGlow(5f);
            }
        }
Ejemplo n.º 2
0
        //-------------------------------------------------------------------------
        public void create(CRenderScene scene, CRenderTurret render_turret)
        {
            mScene = scene;
            mRenderTurret = render_turret;
            mRenderTurret.getTurretId();

            _initTurretBase();
            _initTurretTop();
            _initTurretBarrel();
            _initTurretBlaze();

            _setTrigger(true);
            mTkMaterial = GameObject.Instantiate(Resources.Load(mTkMaterialName)) as UnityEngine.Material;
            mGlowMaterial = GameObject.Instantiate(Resources.Load(mGlowMaterialName)) as UnityEngine.Material;

            #if UNITY_EDITOR
            mTurretBaseSprite.gameObject.name = "TkSpriteTurret";
            mTurretTopSprite.gameObject.name = "TkSpriteTurret";
            mTurretBlazeSprite.gameObject.name = "TkSpriteTurret";
            mTurretBarrelSprite.gameObject.name = "TkSpriteTurret";
            #endif

            if (mRenderTurret.isMyTurret())
            {
                startGlow(5f);
            }
        }