public async Task <ActionResult <EffectsManagerDto> > GetPrograms() { EffectsManager effectManager = new EffectsManager(); await effectManager.LoadEffectsFromDirectory("Assets/Effects"); return(effectManager.ToDto()); }
public Effect(string name) { _name = name; _createdAt = GameManager.FixedGameTime; _seed = EffectsManager.GetSeed(); CreateEffect(); }
// Use this for initialization void Start() { EnemyCurrentHealth = EnemyMaxHealth; enemySprite = GetComponent <SpriteRenderer>(); kill = FindObjectOfType <Killer>(); sound = FindObjectOfType <EffectsManager>(); }
private void Explode() { STGSpriteEffect effect = EffectsManager.GetInstance().CreateEffectByType(EffectType.SpriteEffect) as STGSpriteEffect; effect.SetSprite("STGEffectAtlas", "TransparentCircle", eBlendMode.SoftAdditive, LayerId.STGNormalEffect, true); effect.SetExistDuration(30); effect.SetPosition(_curPos); effect.SetSize(128, 128); effect.ChangeWidthTo(192, 30, InterpolationMode.Linear); effect.ChangeHeightTo(192, 30, InterpolationMode.Linear); effect.DoFade(30); SoundManager.GetInstance().Play("se_explode", 0.1f); float angle = Random.Range(0f, 360f); List <Color> colorList = new List <Color> { new Color(1, 0, 0), new Color(0, 1, 0), new Color(0, 0, 1) }; for (int i = 0; i < 12; i++) { effect = EffectsManager.GetInstance().CreateEffectByType(EffectType.SpriteEffect) as STGSpriteEffect; effect.SetSprite("STGReimuAtlas", "ReimuAHSCEffect", eBlendMode.SoftAdditive, LayerId.STGNormalEffect, true); effect.SetExistDuration(30); effect.SetPosition(_curPos); effect.DoStraightMove(Random.Range(4f, 6f), i * 30 + angle); int colorIndex = Random.Range(0, 3); effect.SetSpriteColor(colorList[colorIndex].r, colorList[colorIndex].g, colorList[colorIndex].b); effect.DoFade(30); effect.SetSize(128, 128); effect.ChangeWidthTo(64, 30, InterpolationMode.Linear); effect.ChangeHeightTo(64, 30, InterpolationMode.Linear); } }
void ZombieDeath() { // determine if we need to drop an item // check the zombie type switch (zombieType) { case ZombieType.fat: // always drop 1... but sometimes drop 2 or 3!?! break; case ZombieType.boom: // explode! break; case ZombieType.split: // don't drop an item, instead spawn 2 more zombies!?! ZombieSpawner.singleton.SplitZombie(thisTransform.position, thisTransform.rotation, thisTransform.forward, targetNode); break; default: // generate 0 or 1 items... break; } // spawn a nice particle effect... EffectsManager.SpawnZombieDeathParticles(thisTransform.position, zombieType); // kill the zombie ZombieSpawner.singleton.KillZombie(zombieIndex); thisTransform.position = ZombieSpawner.singleton.zombieStore.position; thisRigidbody.velocity = Vector3.zero; thisRigidbody.angularVelocity = Vector3.zero; targetNode = null; gameObject.SetActive(false); }
public override bool Eliminate(eEliminateDef eliminateType = eEliminateDef.ForcedDelete) { _curHp = 0; if (base.Eliminate(eliminateType)) { if (eliminateType != eEliminateDef.ForcedDelete) { SoundManager.GetInstance().Play("killenemy", 0.1f, false, true); if (_cfg.eliminatedEffectStyle != 0) { STGEnemyEliminatedEffect effect = EffectsManager.GetInstance().CreateEffectByType(EffectType.EnemyEliminated) as STGEnemyEliminatedEffect; effect.SetEliminateEffectStyle(_cfg.eliminatedEffectStyle); effect.SetPosition(_curPos.x, _curPos.y); } } if (eliminateType != eEliminateDef.ForcedDelete && eliminateType != eEliminateDef.CodeRawEliminate) { if (_dropItemDatas != null) { DropItems(); } } return(true); } return(false); }
bool isSelectStone; // uiのbuttonがタッチされたかチェックするために1フレーム待つためのbool void Awake() { gameManager = GameObject.Find("Manager").GetComponent <GameManager>(); effectsManager = GameObject.Find("Manager").GetComponent <EffectsManager>(); soundManager = GameObject.Find("Manager").GetComponent <SoundManager>(); cameraController = GameObject.Find("Main Camera").GetComponent <CameraController>(); textureNumber = PlayerPrefs.GetInt("TextureNumber", 0); spriteRenderer = transform.Find("stoneimage").gameObject.GetComponent <SpriteRenderer>(); rigidbody2d = GetComponent <Rigidbody2D>(); rigidbody2d.simulated = false; audioSource = GetComponent <AudioSource>(); GameStatusData gameStatus = Resources.Load <GameStatusData>("data/core/GameStatus"); StartPower = gameStatus.startPower; power = StartPower; LowestPower = gameStatus.lowestPower; UpwardQuantity = gameStatus.upwardQuantity; FallQuantity = gameStatus.fallQuantity; AngleRange = gameStatus.angleRange; angle = AngleRange; MaxPower = (UpwardQuantity * 10) + StartPower; AngleForPower = Angle / (MaxPower - LowestPower); hitFlag = new bool[2] { false, false }; consecutive = 0; isSelectStone = false; }
// Use this for initialization void Start() { sound = FindObjectOfType <EffectsManager>(); thePlayer = FindObjectOfType <PlayerShoot>(); kill = FindObjectOfType <Killer>(); Items = FindObjectOfType <Item>(); }
public MainViewModel() { EffectsManager = new EffectsManager(); var builder = new MeshBuilder(); builder.AddSphere(new Vector3(), 2); builder.AddTorus(5, 1); MeshModel = builder.ToMesh(); var lineBuilder = new LineBuilder(); lineBuilder.AddGrid(BoxFaces.All, 10, 10, 10, 10); LineModel = lineBuilder.ToLineGeometry3D(); var offset = new Vector3(-4, 0, 0); PointModel = new PointGeometry3D() { Positions = new Vector3Collection(MeshModel.Positions.Select(x => x + offset)) }; ExportCommand = new RelayCommand((o) => { Export(); }); ImportCommand = new RelayCommand((o) => { Import(); }); ExportSingleTechnique = new RelayCommand((o) => { Export(SelectedTechnique); }); }
private void spawnHitEffect(float inOldNailPassedHeight, float inNewNailPassedHeight, float inHeightToPass, Vector2 inHitRelativePosition) { float theHalfHeightToPass = inHeightToPass / 2; ParticleSystem theParticleSystemToSpawn = null; //Default only if speed is enough float theRatioHeightPassedByHit = (inNewNailPassedHeight - inOldNailPassedHeight) / inHeightToPass; if (theRatioHeightPassedByHit > _ratioHeightPassedByHitLimitToSpawnEffects) { theParticleSystemToSpawn = _hitEffectParticleSystem; } if (inOldNailPassedHeight < theHalfHeightToPass && inNewNailPassedHeight >= theHalfHeightToPass) { theParticleSystemToSpawn = _halfPassedHitEffectParticleSystem; } if (inOldNailPassedHeight < inHeightToPass && inNewNailPassedHeight >= inHeightToPass) { theParticleSystemToSpawn = _fullPassedHitEffectParticleSystem; SoundsManager.spawnSoundPlayer(_soundPlayer, _sounds[1], transform.TransformPoint(inHitRelativePosition)); } if (theParticleSystemToSpawn) { EffectsManager.spawnParticleSystem(theParticleSystemToSpawn, transform.TransformPoint(inHitRelativePosition)); } //SpawnSoundPlayer(_sounds[0], transform.TransformPoint(inHitRelativePosition)); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); GUI.enabled = Application.isPlaying; TestEffectsManager e = target as TestEffectsManager; EffectsManager effectsManager = e.effectManager; if (GUILayout.Button("Produce puddle effect")) { ; effectsManager.ProducePuddleEffect(e.puddleArgument); } if (GUILayout.Button("Produce shake effect")) { effectsManager.ProduceShakeEffect(e.shakeArgument); } if (GUILayout.Button("Produce cat sound effect")) { effectsManager.ProduceCatSound(e.transform); } }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); spriteSheet = Content.Load <Texture2D>(@"Textures\SpriteSheet"); Player.Initialize(spriteSheet, new Rectangle(0, 64, 32, 32), 6, new Rectangle(0, 96, 32, 32), 1, new Vector2(256, 256)); WeaponManager.Texture = spriteSheet; EffectsManager.Initialize(spriteSheet, new Rectangle(0, 288, 2, 2), new Rectangle(0, 256, 32, 32), 3); TileMap.Initialize(spriteSheet); GoalManager.Initialize(spriteSheet, new Rectangle(0, 7 * 32, 32, 32), new Rectangle(3 * 32, 7 * 32, 32, 32), 3, 1); EnemyManager.Initialize(spriteSheet, new Rectangle(0, 160, 32, 32)); titleScreen = Content.Load <Texture2D>(@"Textures\TitleScreen"); pericles14 = Content.Load <SpriteFont>(@"Fonts\Pericles14"); Camera.WorldRectangle = new Rectangle(0, 0, 1600, 1600); Camera.ViewportWidth = 800; Camera.ViewportHeight = 600; }
// Update is called once per frame void Update() { //isOver = true; //if (particleSystems.Count > 0) //{ // for (int i = 0; i < particleSystems.Count; i++) // { // if (!particleSystems[i].isStopped) // { // isOver = false; // break; // } // } // if (isOver) // { // GameObject.Destroy(this.gameObject); // } //} time--; if (time <= 0) { string otherName = name.Substring(0, name.LastIndexOf("(")); EffectsManager.getInstance().get(otherName).recyleObj(id); } }
/// <summary> /// 停止对应名称的抖动特效 /// <para>name</para> /// </summary> /// <param name="luaState"></param> /// <returns></returns> public static int StopShakeScreen(ILuaState luaState) { string name = luaState.ToString(-1); EffectsManager.GetInstance().FinishEffectByName(name); return(0); }
private void Awake() { if (instance == null) { instance = this; // DontDestroyOnLoad(this); } else { Destroy(gameObject); } foreach (AudioSource a in audioSources) { if (a != null) { Destroy(a.gameObject); } } audioSources.Clear(); for (int i = 0; i < defaultAudiosourcesAmount; i++) { AudioSource source = CreateAudioSource(); audioSources.Add(source); } }
public void Init() { // 游戏本体边界 Global.GameLBBorderPos = new Vector2(-Consts.GameWidth / 2, -Consts.GameHeight / 2); Global.GameRTBorderPos = new Vector2(Consts.GameWidth / 2, Consts.GameHeight / 2); // 弹幕边界 Global.BulletLBBorderPos = new Vector2(Global.GameLBBorderPos.x - 100, Global.GameLBBorderPos.y - 100); Global.BulletRTBorderPos = new Vector2(Global.GameRTBorderPos.x + 100, Global.GameRTBorderPos.y + 100); // 玩家坐标边界 Global.PlayerLBBorderPos = new Vector2(Global.GameLBBorderPos.x + 10, Global.GameLBBorderPos.y + 10); Global.PlayerRTBorderPos = new Vector2(Global.GameRTBorderPos.x - 10, Global.GameRTBorderPos.y - 10); InterpreterManager.GetInstance().Init(); STGStageManager.GetInstance().Init(); AnimationManager.GetInstance().Init(); BulletsManager.GetInstance().Init(); EnemyManager.GetInstance().Init(); ItemManager.GetInstance().Init(); ColliderManager.GetInstance().Init(); ExtraTaskManager.GetInstance().Init(); EffectsManager.GetInstance().Init(); STGEliminateEffectManager.GetInstance().Init(); BackgroundManager.GetInstance().Init(); #if ShowCollisionViewer CollisionViewer.Instance.Init(); #endif }
void Awake() { if (instance == null) instance = this; else if (instance != null) Destroy (gameObject); }
public MainWindow() { InitializeComponent(); manager = new DefaultEffectsManager(); DataContext = viewmodel; buttonRemoveViewport.IsEnabled = false; }
//WaitForSeconds shotDuration = new WaitForSeconds(0.04f); // Use this for initialization void Awake() { if (!instance) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); return; } //we'll probably want to preset these, since not every child that a particle system is necessarily part of the debris pool debrisPool = GetComponentsInChildren <ParticleSystem>(); linePool = GetComponentsInChildren <LineRenderer>(); audioPool = GetComponentsInChildren <AudioSource>(); // Configure Lines Material lineMaterial = new Material(Shader.Find("Particles/Additive")); foreach (LineRenderer line in linePool) { line.material = lineMaterial; line.colorGradient = defaultShotColor; } DontDestroyOnLoad(this); }
public Bullet(string name, ContentManager content, Vector2 location, Vector2 velocity, float acceleration, float activeTime) { this.Name = name; this.enabled = true; frameWidth = 8; frameHeight = 8; this.velocity = velocity; this.aliveTime = activeTime; this.timePassed = 0.0f; this.acceleration = acceleration; texture = content.Load <Texture2D>(@"bullet"); CollisionRectangle = new Rectangle(0, 0, 8, 8); this.color = Color.DarkRed; drawDepth = 0.5f; enabled = true; tileMap = TileMap.GetInstance(); Camera = CameraManager.GetInstance(); this.location = location; EffectsManager = EffectsManager.GetInstance(); this.Transparency = 1.0f; var font = content.Load <SpriteFont>(@"font"); label = new Label(this.Camera.Camera, this.location, new Vector2(+font.MeasureString(name).X / 2 - frameWidth / 2, frameHeight / 2 + font.MeasureString(name).Y / 2), new FontInfo { Color = Color.Black, Font = font, Text = name }, 100.0f); }
private void ClearView() { // floor plane grid var Maxreset = 100; var Minreset = -100; EffectsManager.Dispose(); EffectsManager = new DefaultEffectsManager(); var points = new PointGeometry3D(); var col = new Color4Collection(); // gradient na kolory var ptPos = new Vector3Collection(); // pozycje punktów var ptIdx = new IntCollection(); // indeksy punktów arrows = lines = new LineBuilder(); points.Positions = ptPos; points.Indices = ptIdx; points.Colors = col; PointsColor = Colors.White; // <- nie pamiętam po co to tutaj ale bez tego nie działa Points = points; PointsTransform = new Media3D.TranslateTransform3D(0, 0, Minreset); CreateGrid(Maxreset, Minreset, Maxreset, Maxreset, Minreset); Grid = lines.ToLineGeometry3D(); GridColor = new Color4(153 / 255.0f, 204 / 255.0f, 255 / 255.0f, (float)0.3).ToColor();; GridTransform = new Media3D.TranslateTransform3D(0, 0, Minreset); // strzałki CreateArrows(Maxreset, Minreset, Maxreset, Minreset, Maxreset, Minreset); Arrow = arrows.ToLineGeometry3D(); ArrowColor = new Color4(0, 255 / 255.0f, 255 / 255.0f, (float)0.5).ToColor();; ArrowTransform = new Media3D.TranslateTransform3D(0, 0, Minreset); }
private void Start() { this._numLeaves = 0; if (GameObject.FindWithTag("NumLeaves")) { this._numLeavesText = GameObject.FindWithTag("NumLeaves").GetComponent <UnityEngine.UI.Text>(); } this._currentFatigue = this.maxFatigue; this._currentHydration = this.maxHydration; this._currentTemperature = this.maxTemperature; this._rb2D = this.GetComponent <Rigidbody2D>(); this.normalFatigue = new NormalPlayer(this); this.tiredFatigue = new TiredPlayer(this); this.exhaustedFatigue = new ExhaustedPlayer(this); this.fatigueState = this.normalFatigue; this.oldFatigueState = this.fatigueState; this.playerDeath = new PlayerDeath(this); this._rigidBody = this.GetComponent <Rigidbody2D>(); this._facingRight = true; this.skeletonAnimation.state.SetAnimation(0, "Idle", true); this._isGrounded = this._lastIsGrounded = false; this._hydrationFX = false; this._tempFX = false; this._fxMan = this.GetComponent <EffectsManager>(); }
public void SetEffectsManager(EffectsManager em) { foreach (FXBase f in fx) { f.Init(em); } }
public void CollidedWith(Collider _collider) { Parryable parryable = _collider.GetComponent <Parryable>(); if (parryable) { parryable.OnParried(); AudioManager.Instance.PlaySound("parry"); EffectsManager.SpawnEffect("Parry", _collider.transform.position, Quaternion.Euler(-90.0f, 0.0f, 0.0f), Vector3.one, 2.0f); m_parriedSomething = true; m_player.CurrentCombo += 1; m_mana.Mana += parryable.m_manaValue * m_player.m_comboMultiplier; } Hurtbox hurtbox = _collider.GetComponent <Hurtbox>(); if (hurtbox) { if (hurtbox.m_damageType != m_hitbox.m_damageType) { hurtbox.ApplyDamage(m_damage); } } }
/// <summary> /// 创建自定义的STGObject /// <para>string customizedName 自定义名称</para> /// <para>posX</para> /// <para>posY</para> /// <para>args...</para> /// </summary> /// <param name="luaState"></param> /// <returns></returns> public static int CreateCustomizedSTGObject(ILuaState luaState) { int top = luaState.GetTop(); int numArgs = top - 3; string customizedName = luaState.ToString(-top); float posX = (float)luaState.ToNumber(-top + 1); float posY = (float)luaState.ToNumber(-top + 2); int funcRef = InterpreterManager.GetInstance().GetCustomizedFuncRef(customizedName, eCustomizedType.STGObject, eCustomizedFuncRefType.Init); luaState.RawGetI(LuaDef.LUA_REGISTRYINDEX, funcRef); STGSpriteEffect effect = EffectsManager.GetInstance().CreateEffectByType(EffectType.SpriteEffect) as STGSpriteEffect; effect.SetPosition(posX, posY); luaState.PushLightUserData(effect); // 复制参数 int copyIndex = -numArgs - 2; for (int i = 0; i < numArgs; i++) { luaState.PushValue(copyIndex); } luaState.Call(numArgs + 1, 0); // 返回结果 luaState.PushLightUserData(effect); return(1); }
// Start is called before the first frame update void Start() { boss = GameObject.Find("NecromancerBoss"); shootPoint = GameObject.Find("ShootPoint2"); sp = shootPoint.GetComponent <Transform>(); sound = FindObjectOfType <EffectsManager>(); }
void Start() { carRef = GameObject.Find("Car").transform; progressManagerRef = GameObject.Find("ProgressManager").GetComponent <ProgressManager>(); _effectsManager = effectsManagerLocator.GetEffectsManager(); }
// Use this for initialization void Start() { effectsManager = effectsManagerGO.GetComponent <EffectsManager> (); table = tableGO.GetComponent <Table> (); prefabsManager = prefabsManagerGO.GetComponent <PrefabsManager> (); Almighty.registerGameManager(this); }
/// <summary> /// Spawns an explosion particle effect, as well as applying force to all damageable objects caught in the radius. /// </summary> /// <param name="centre"></param> /// <param name="radius"></param> /// <param name="power"></param> /// <param name="explosionLayers"></param> public static void ExplosionForce(Vector3 centre, float radius, float power, LayerMask explosionLayers) { int count = Physics.OverlapSphereNonAlloc(centre, radius, hits, explosionLayers); DamageInfo dmgInfo = new DamageInfo(); dmgInfo.forceMode = ForceMode.VelocityChange; dmgInfo.damage = power; EffectsManager.SpawnExplosion(centre); targets.Clear(); for (int i = 0; i < count; i++) { IDamageable pTarget = hits[i].transform.root.GetComponent <IDamageable>(); if (pTarget == null) { continue; } if (targets.Contains(pTarget)) { continue; } Vector3 dir = (pTarget.GetPosition() - centre).normalized; Vector3 forceDir = (pTarget.GetPosition() - centre + Vector3.up).normalized * power; dmgInfo.force = forceDir; pTarget.TakeDamage(dmgInfo); targets.Add(pTarget); } }
public CoreTestApp(Form window) { viewport = new ViewportCore(window.Handle); cameraController = new CameraController(viewport); this.window = window; window.ResizeEnd += Window_ResizeEnd; window.Load += Window_Load; window.FormClosing += Window_FormClosing; window.MouseMove += Window_MouseMove; window.MouseDown += Window_MouseDown; window.MouseUp += Window_MouseUp; window.MouseWheel += Window_MouseWheel; window.KeyDown += Window_KeyDown; window.KeyUp += Window_KeyUp; window.KeyPress += Window_KeyPress; effectsManager = new DefaultEffectsManager(); effectsManager.AddTechnique(ImGuiNode.RenderTechnique); viewport.EffectsManager = effectsManager; viewport.OnStartRendering += Viewport_OnStartRendering; viewport.OnStopRendering += Viewport_OnStopRendering; viewport.OnErrorOccurred += Viewport_OnErrorOccurred; //viewport.FXAALevel = FXAALevel.Low; viewport.RenderHost.EnableRenderFrustum = false; viewport.RenderHost.RenderConfiguration.EnableRenderOrder = true; viewport.BackgroundColor = new Color4(0.45f, 0.55f, 0.6f, 1f); InitializeScene(); }
public static void BubblesWaterAnimation(SceneManager sceneMgr, Vector3 pos, string baseName, int count, Vector2 range, Vector2 size) { Vector2 sizeRand; string name; for (uint i = 0; i < count; i++) { float h = Mogre.Math.RangeRandom(-20, -5); float angle = Mogre.Math.RangeRandom(-10, 10); Vector2 rand = ViewHelper.RandomVector2(range.x, range.y); Vector3 posView = new Vector3(pos.x + rand.x, pos.y + h, pos.z + rand.y); name = EffectsManager.BuildSpriteEffectName(sceneMgr.RootSceneNode, EffectsManager.EffectType.BUBBLES, baseName + "_bubbles_" + i); NodeAnimation.NodeAnimation node = EffectsManager.Singleton.GetEffect(name); if (!EffectsManager.Singleton.EffectExists(name) || (node != null && node.Ended)) { sizeRand = size * Math.RangeRandom(0.9f, 1.1f); VisibilityNodeAnimation ani = EffectsManager.Singleton.RectangularEffect(sceneMgr, sceneMgr.RootSceneNode, baseName + "_bubbles_" + i, EffectsManager.EffectType.BUBBLES, posView, sizeRand, new Quaternion(new Radian(new Degree(90)), Vector3.UNIT_X) * new Quaternion(new Radian(new Degree(angle)), Vector3.UNIT_Y), false); ani.Duration = Mogre.Math.RangeRandom(ani.Duration, 2 * ani.Duration); ani.TimeScale = Mogre.Math.RangeRandom(0.5f, 1.5f); } } }
/// <summary> /// 获取单例 /// </summary> /// <returns></returns> public static EffectsManager getInstance() { if (g_instance == null) { g_instance = new EffectsManager(); } return g_instance; }
void Awake () { if (Instance) { Destroy(gameObject); return; } Instance = this; }
private Player(string name, int health, int mana) { Name = name; MaxHealth = Health = health; MaxMana = Mana = mana; Strength = 1; Intellegence = 1; Agility = 1; EffectsManager = new EffectsManager(this); }
void Start(){ Instance = this; //initialize item effect pool itemEffectPool = new List<GameObject>(); for (int i=0 ; i<itemEffectPoolSize; i++){ GameObject go = (GameObject) Instantiate(itemEffectPrefab, itemEffectPrefab.transform.position, Quaternion.identity); go.transform.parent = gameObject.transform; go.transform.localScale = new Vector3(1f, 1f, 1f); itemEffectPool.Add(go); } itemEffectNextIndex = 0; itemEffectReadyIndex = -1; //initialize coin effect pool coinEffectPool = new List<GameObject>(); for (int i=0 ; i<coinEffectPoolSize; i++){ GameObject go = (GameObject) Instantiate(coinEffectPrefab, coinEffectPrefab.transform.position, Quaternion.identity); go.transform.parent = gameObject.transform; go.transform.localScale = new Vector3(1f, 1f, 1f); coinEffectPool.Add(go); } coinEffectNextIndex = 0; coinEffectReadyIndex = -1; //initialize splash effect pool splashEffectPool = new List<GameObject>(); for (int i=0 ; i<splashEffectPoolSize; i++){ GameObject go = (GameObject) Instantiate(splashEffectPrefab, splashEffectPrefab.transform.position, Quaternion.identity); go.transform.parent = gameObject.transform; go.transform.localScale = new Vector3(1f, 1f, 1f); splashEffectPool.Add(go); } splashEffectNextIndex = 0; splashEffectReadyIndex = -1; }
// Use this for initialization void Start() { effectsManager = effectsManagerGO.GetComponent<EffectsManager> (); table = tableGO.GetComponent<Table> (); prefabsManager = prefabsManagerGO.GetComponent<PrefabsManager> (); Almighty.registerGameManager (this); }
void Awake() { //Singletone if (ins == null) { ins = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
void Awake() { instance = this; }
public void Init(ContentManager content) { isRunning = false; soundMgr = DayGameEngineImp.getGameEngine().getSoundManager(); uiMgr = new NightUiManagerImpl(); menuMgr = DayGameEngineImp.getGameEngine().getMenuManager(); mapMgr = DayGameEngineImp.getGameEngine().getMapManager(); zombieMgr = new ZombieManagerImplementation(); effectsMgr = new EffectsManagerImp(); survivorMgr = new SurvivorManagerIMP(); nightSimMgr = new NightSimMgrImpl(); nightSimMgr.init(); effectsMgr.Init(content); //uiMgr.init(); //menuMgr.Init(content); // gets init in the daygameengine //mapMgr.Init(); zombieMgr.init(content); survivorMgr.init(content); nightview = content.Load<Texture2D>("Images//nightclouds"); }