void Start() {
		fxManager = GameObject.FindObjectOfType<FXManager>();
		
		if(fxManager == null) {
			Debug.LogError("Couldn't find an FXManager.");
		}
	}
Ejemplo n.º 2
0
 void Awake()
 {
     s_Instance = this;
     if(!GameObject.Find("FXManager"))
     {
         DontDestroyOnLoad(gameObject);
     }
 }
Ejemplo n.º 3
0
 // Create Bat Destroyed method
 public void Kill()
 {
     EnemyManager.Get().GetBats().Remove(gameObject);
     FXManager.Get().PlaySFX("sfx/Splat 2", Random.Range(0, 5), 0.1F);
     GameManager.Get().SpawnParticles(transform.position, Color.black);
     FXManager.Get().DoHitPause();
     Destroy(gameObject);
 }
Ejemplo n.º 4
0
    public AudioManager()
    {
        gameObject = new GameObject("AudioManager");
        gameObject.AddComponent<AudioListener>(); //we don't need a reference to it, we just need it to exist

        musicManager = new MusicManager(this);
        fxManager = new FXManager(this);
    }
Ejemplo n.º 5
0
    public override void Effect()
    {
        base.Effect();

        clone          = GameObject.Instantiate(character.gameObject);
        animator.speed = 0f;

        GameController.GetInstance().Invoke(() => {
            render = character.Find("Render").gameObject;
            FXManager.GetInstance().SmokeSpawn(character.position, character.rotation, null);
            render.SetActive(false);
        }, 0.6f);

        GameController.GetInstance().Invoke(() => {
            FXManager.GetInstance().SmokeSpawn(focus, character.rotation, null);
            FXManager.GetInstance().SmokeSpawn(character.position, character.rotation, null);
            animator.speed = 1f;
        }, 1.4f);
        GameController.GetInstance().Invoke(() => {
            if (switchPosition)
            {
                clone.transform.position = character.position;
                character.position       = focus;
            }
            else
            {
                clone.transform.position = focus;
            }

            SetIdentity(clone);

            UnitManager.GetInstance().AddUnit(clone.GetComponent <Unit>());
            clone.GetComponent <Unit>().Buffs.Add(new DirectionBuff());
            clone.GetComponent <Animator>().Play(animator.GetCurrentAnimatorStateInfo(0).fullPathHash, 0, animator.GetCurrentAnimatorStateInfo(0).normalizedTime);
            clone.GetComponent <Animator>().SetInteger("Skill", 0);
            character.GetComponent <Unit>().UnitEnded += SetCloneEnd;
            render.SetActive(true);
        }, 1.6f);


        //var clone = GameObject.Instantiate(character.gameObject);
        //if (switchPosition)
        //{
        //    clone.transform.position = character.position;
        //    character.position = focus;
        //}
        //else
        //{
        //    clone.transform.position = focus;
        //}
        //clone.GetComponent<CharacterStatus>().characterIdentity = CharacterStatus.CharacterIdentity.clone;

        //UnitManager.GetInstance().AddUnit(clone.GetComponent<Unit>());
        //clone.GetComponent<Unit>().Buffs.Add(new DirectionBuff());
        //clone.GetComponent<Animator>().Play(animator.GetCurrentAnimatorStateInfo(0).fullPathHash, 0, animator.GetCurrentAnimatorStateInfo(0).normalizedTime);
        //clone.GetComponent<Animator>().SetInteger("Skill", 0);
        //clone.GetComponent<Unit>().OnUnitEnd();
    }
Ejemplo n.º 6
0
    public IEnumerator Interact(HeroModel model)
    {
        yield return(model.Sleep(this));

        //yield return new WaitForSeconds(1);
        Debug.Log("BED// Restoring " + (World.Config.restLifeHeal + " HP").Colored(Color.green) + " to Hero");

        FXManager.ShowPopupAt(transform.position, "+" + World.Config.restLifeHeal + " HP", 2, Color.green);
    }
Ejemplo n.º 7
0
    private void Start()
    {
        instance = this;

        smoke    = (Resources.Load("Prefabs/Particle/Smoke") as GameObject).transform;
        hitPoint = (Resources.Load("Prefabs/Particle/HitPoint") as GameObject).transform;
        dust     = (Resources.Load("Prefabs/Particle/Dust") as GameObject).transform;
        stub     = (Resources.Load("Prefabs/Particle/Stub") as GameObject).transform;
    }
Ejemplo n.º 8
0
 void Start()
 {
     audioSource = GetComponent <AudioSource>();
     fxManager   = GameObject.FindObjectOfType <FXManager>();
     if (fxManager == null)
     {
         Debug.Log("Could not find fxManager..");
     }
 }
Ejemplo n.º 9
0
    public IEnumerator Interact(HeroModel model)
    {
        yield return(new WaitForSeconds(1));

        Debug.Log("CASTLE// Working... :C Earned " + World.Config.workGoldPay + " gold");
        model.playerGold += World.Config.workGoldPay;

        FXManager.ShowPopupAt(transform.position, "+" + World.Config.workGoldPay + " GOLD", 2, Color.yellow);
    }
Ejemplo n.º 10
0
    void Start()
    {
        fxmanager = GameObject.FindObjectOfType <FXManager>();

        if (fxmanager == null)
        {
            Debug.Log("No FXManager");
        }
    }
Ejemplo n.º 11
0
    void Start()
    {
        fxManager = GameObject.FindObjectOfType <FXManager> ();

        if (fxManager == null)
        {
            Debug.LogError("Couldn't find fxManager");
        }
    }
Ejemplo n.º 12
0
 void Start()
 {
     fxManager = controlledMinion.GetComponentInChildren <FXManager>();
     playerRig = controlledMinion.GetComponent <Rigidbody>();
     currentCameraPositionOffset = new Vector3(0, 16.93f, -7.85f);
     controlledMinion.GetComponentInChildren <Image>().enabled = true;
     currentCameraCamera = currentCamera.GetComponentInChildren <Camera>().gameObject.transform;
     squadManager        = FindObjectOfType <GameplayManager>().squadManager;
 }
Ejemplo n.º 13
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.name.Contains("player"))
     {
         GameManager.Get().GetPlayer().GetComponent <Player>().HitPlayer();
         FXManager.Get().PlaySFX("sfx/Splat 1", Random.Range(0, 3), 0.1F);
         Kill();
     }
 }
Ejemplo n.º 14
0
    private int damageRadius; //Varies for missiles & Exp Shells



    //****************
    void Awake()
    {
        GameObject tempObject   = GameObject.Find("PlayerCamera");
        Camera     playerCamera = tempObject.GetComponent <Camera>(); //

        sfx = tempObject.GetComponent <FXManager>();                  //

        tempObject   = GameObject.Find("A_Scene_Manager");
        SceneManager = tempObject.GetComponent <ScriptASceneManager>();
    }
Ejemplo n.º 15
0
 public void EndDash()
 {
     FXManager.StopGhostFX(transform.Find("Model").gameObject);
     if (dashCoroutine != null)
     {
         StopCoroutine(dashCoroutine);
     }
     healthState = HealthState.Normal;
     UnFreeze();
 }
Ejemplo n.º 16
0
 private void Awake()
 {
     Application.targetFrameRate = 60;
     _dataManager  = FindObjectOfType <DataManager>();
     _roadManager  = FindObjectOfType <RoadManager>();
     _player       = FindObjectOfType <MovePlayer>();
     _scoreManager = FindObjectOfType <ScoreManager>();
     _uiManager    = FindObjectOfType <UIManager>();
     _fxManager    = FindObjectOfType <FXManager>();
 }
Ejemplo n.º 17
0
    //-------------------
    // AWAKE
    //-------------------
    void Awake()
    {
        pointsValue = 1500;

        armour = 5; // subtracted from any hit damage values this enemy may receive



        bulletXY    = new Vector3[4]; //for 4 BARRELS:  offsets on the end of the turret Gun: 2x2 grid
        bulletXY[0] = new Vector3(0, 0, 0);
        bulletXY[1] = new Vector3(0, 0, 0);
        bulletXY[2] = new Vector3(0, 0, 0);
        bulletXY[3] = new Vector3(0, 0, 0);


        turretZOffset = 0f; // Makes Missile appear on end of 'barrel' Z and not from its pivot point



        state = mode.passive;

        attackRadius = 350;
        blindRadius  = 100; // Switches off the targeting if too close

        GameObject tempObject = GameObject.Find("GunView");

        target = tempObject.transform;

        tempObject   = GameObject.Find("PlayerCamera");
        playerCamera = tempObject.GetComponent <Camera>();    //
        sfx          = tempObject.GetComponent <FXManager>(); //

        //Find and get INPUT MANAGER SCRIPT - Totally necessary :)
        tempObject = GameObject.Find("A_GameWrapper");
        inp        = tempObject.GetComponent <ScriptAInputManager>(); //

        tempObject         = GameObject.Find("A_Scene_Manager");
        sceneManagerScript = tempObject.GetComponent <ScriptASceneManager>(); // Access to 'LEVEL DATA[]'  file necessary

        // NGUI LABELS POOL
        tempObject   = GameObject.Find("A_Null_Labels");
        pointsScript = tempObject.GetComponent <ScriptPointsManager>();


        // Get Turret hinge
        for (int i = 0; i < transform.childCount; i++)
        {
            Transform c = transform.GetChild(i); if (c.name == "turntable")
            {
                hinge = c;
            }
        }
        // Get turret
        //for (int i = 0; i < hinge.transform.childCount; i++) { Transform c = hinge.transform.GetChild(i); if (c.name == "gun") { turret = c; } }
    }
Ejemplo n.º 18
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 19
0
    public void GameOver()
    {
        //Game over Screen, music, etc
        //Debug.Log("Game Over");
        FXManager.Get().SetMusic(null);
        FXManager.Get().PlaySFX("sfx/game over", 0F, 0.5F);
        m_player.SetActive(false);
        m_player.GetComponent <Player>().m_gun.SetActive(false);

        StartCoroutine(Co_LoseCard());
    }
Ejemplo n.º 20
0
    public IEnumerator Interact(HeroModel model)
    {
        Debug.Log("TRAINING ZONE// Estoy entrenanding :)");
        yield return(new WaitForSeconds(1));

        model.CharacterMaxLife += World.Config.trainMaxLifeIncr;
        model.playerBaseAtk    += model.currentWeapon == "Sword" ? World.Config.trainAtkIncr * World.Config.trainWithWeaponMultiplier : World.Config.trainAtkIncr;
        model.ConsumeWeapon(World.Config.trainWeaponUses);

        FXManager.ShowPopupAt(transform.position, "Level Up!", 2, Color.yellow);
    }
Ejemplo n.º 21
0
    protected override bool ApplyEffects()
    {
        FXManager.GetInstance().SmokeSpawn(focus, character.rotation, null);
        RoundManager.GetInstance().Invoke(() => {
            character.position = focus;
            render.SetActive(true);
        }, 0.2f);
        range.Delete();

        return(true);
    }
Ejemplo n.º 22
0
 void Start()
 {
     m_inputAllowed = true;
     if (m_rigidbody == null)
     {
         m_rigidbody = GetComponent <Rigidbody>();
     }
     if (m_fxManager == null)
     {
         m_fxManager = GetComponent <FXManager>();
     }
 }
Ejemplo n.º 23
0
    void Start()
    {
        this.speed    = 0.015f;
        this.canMove  = true;
        this.isSit    = false;
        gameStart     = false;
        this.animator = GetComponent <Animator> ();

        fxManager = GameObject.Find("FXManager").GetComponent <FXManager> ();
        StartCoroutine(Instructions());
        StartCoroutine(GameStart());
    }
Ejemplo n.º 24
0
 public List <GameObject> fxObjects; //Añadimos los prefabs que sean sistemas de partículas
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(this.gameObject);
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
Ejemplo n.º 25
0
    public override IEnumerator ReceiveDmg(float dmg, CharacterModel model)
    {
        yield return(base.ReceiveDmg(dmg, model));

        if (CharacterCurrLife < World.Config.playerInjuredLife)
        {
            playerSeriouslyInjured = true; bloodParticles.Play();
        }

        FXManager.ShowPopupAt(transform.position, "-" + dmg + " HP", 2, Color.red);
        yield return(null);
    }
Ejemplo n.º 26
0
        private void OnStarshipStrike(uint uid, object cookie)
        {
            SmartEntity smartEntity = (SmartEntity)cookie;
            string      assetName   = string.Format(smartEntity.BuildingComp.BuildingType.DestructFX, new object[]
            {
                smartEntity.BuildingComp.BuildingType.SizeX,
                smartEntity.BuildingComp.BuildingType.SizeY
            });
            FXManager fXManager = Service.Get <FXManager>();

            fXManager.CreateAndAttachFXToEntity(smartEntity, assetName, "TrapDestruction", null, false, Vector3.zero, false);
        }
Ejemplo n.º 27
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(this.gameObject);
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 28
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(this.gameObject);
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 29
0
    private void Awake()
    {
        if (_instance != null && _instance != this)
        {
            Destroy(this.gameObject);
        }

        else
        {
            _instance = this;
        }
    }
Ejemplo n.º 30
0
    //-------------------
    // AWAKE
    //-------------------
    void Awake()
    {
        pointsValue = 850;

        armour = 15; // subtracted from any hit damage values this enemy may receive


        state = mode.passive;

        attackRadius = 260;

        blindRadius = 70; // Switches off the targeting if too close

        GameObject tempObject = GameObject.Find("GunView");

        target = tempObject.transform;

        tempObject   = GameObject.Find("PlayerCamera");
        playerCamera = tempObject.GetComponent <Camera>();    //
        sfx          = tempObject.GetComponent <FXManager>(); //

        //Find and get INPUT MANAGER SCRIPT - Totally necessary :)
        tempObject = GameObject.Find("A_GameWrapper");
        inp        = tempObject.GetComponent <ScriptAInputManager>(); //

        tempObject         = GameObject.Find("A_Scene_Manager");
        sceneManagerScript = tempObject.GetComponent <ScriptASceneManager>(); // Access to 'LEVEL DATA[]'  file necessary

        // NGUI LABELS POOL
        tempObject   = GameObject.Find("A_Null_Labels");
        pointsScript = tempObject.GetComponent <ScriptPointsManager>();


        // Get Turret hinge
        for (int i = 0; i < transform.childCount; i++)
        {
            Transform c = transform.GetChild(i); if (c.name == "turret")
            {
                hinge = c;
            }
        }
        if (hinge)
        {
            for (int i = 0; i < hinge.transform.childCount; i++)
            {
                Transform c = hinge.transform.GetChild(i); if (c.name == "gun")
                {
                    turret = c;
                }
            }
        }
    }
Ejemplo n.º 31
0
 public void Reinitiate()
 {
     _player         = GameObject.FindGameObjectWithTag("Player");
     fXManager       = _player.GetComponent <FXManager>();
     playerMovements = _player.GetComponent <PlayerMovements>();
     _jumpSFX        = GameObject.Find("Jump_SFX").GetComponent <AudioSource>();
     _dashSFX        = GameObject.Find("Dash_SFX").GetComponent <AudioSource>();
     _inputsPanel    = GameObject.Find("Inputs_Panel");
     if (SceneManager.GetActiveScene().buildIndex != 1)
     {
         _inputsPanel.SetActive(false);
     }
 }
Ejemplo n.º 32
0
    protected override bool ApplyEffects()
    {
        FXManager.GetInstance().SmokeSpawn(focus, character.rotation, null);
        RoundManager.GetInstance().Invoke(() => {
            character.position = focus;
            render.SetActive(true);
            var pair = SkillManager.GetInstance().skillQueue.Peek();
            ((UnitSkill)pair.Key).Complete();
        }, 0.2f);
        range.Delete();

        return(true);
    }
Ejemplo n.º 33
0
    private void Start()
    {
        if (allHealth == null)
        {
            allHealth = new List <Health>();
        }

        allHealth.Add(this);

        Init();

        fxManager = GameManager.ActiveGameManager.FXManager;
    }
Ejemplo n.º 34
0
 public void ToggleCredits()
 {
     FXManager.Get().PlaySFX("sfx/Menu Click 1", Random.Range(0, 2), 1F);
     m_creditsPanel.SetActive(!m_creditsPanel.activeSelf);
     if (m_creditsPanel.activeSelf)
     {
         FXManager.Get().SetMusic("music/Ending Credits Music V.3");
     }
     else
     {
         FXManager.Get().SetMusic("music/Main Title Theme V.2");
     }
 }
Ejemplo n.º 35
0
    void Awake()
    {
        myPhotonView = this.GetComponent<PhotonView>();
        myHealth = this.GetComponent<Health>();
        myHealth.currentHealth = maxHealth;

        fxManager = GameObject.FindObjectOfType<FXManager>();
        fxManagerPhotonView = fxManager.GetComponent<PhotonView>();

        netMan = GameObject.FindObjectOfType<NetMan>();
        netManPhotonView = netMan.GetComponent<PhotonView>();

        myMovement = this.GetComponent<KnightMovement>();
    }
Ejemplo n.º 36
0
	void CacheComponents() {
		if(anim == null) {
			anim = GetComponent<Animator>();
			if(anim == null) {
				Debug.LogError ("ZOMG, you forgot to put an Animator component on this character prefab!");
			}

			cc = GetComponent<CharacterController>();
			if(cc == null) {
				Debug.LogError("No character controller!");
			}

			fxManager = GameObject.FindObjectOfType<FXManager>();
			
			if(fxManager == null) {
				Debug.LogError("Couldn't find an FXManager.");
			}
		}

		// Cache more components here if required!
	}
Ejemplo n.º 37
0
    private void Initialize()
    {
        Inst = this;

        //Initializing CsDebug
        CsDebug debug = GetComponent<CsDebug>();
        debug.Initialize();

        //Initializing DBManager
        DBManager = new DBManager();
        DBManager.Initialize();

        //Initializing Event Manager
        EventManager = new EventManager();
        EventManager.Initialize();

        //Initializing NPC Manager
        NPCManager = new NPCManager();
        NPCManager.Initialize();

        //SelectedPC = GameObject.Find("HumanCharacter").GetComponent<HumanCharacter>();
        //SelectedPC.Initialize();
        PlayerControl = new PlayerControl();
        PlayerControl.Initialize();
        GameObject.Find("HumanCharacter2").GetComponent<HumanCharacter>().Initialize();
        //GameObject.Find("HumanCharacter3").GetComponent<HumanCharacter>().Initialize();

        CameraController = GameObject.Find("CameraController").GetComponent<CameraController>();
        CameraController.Initialize();

        FXManager = new FXManager();
        FXManager.Initialize(50);

        AIScheduler = new AIScheduler();
        AIScheduler.Initialize();

        StartCoroutine(DoPerSecond());
    }
Ejemplo n.º 38
0
    // Use this for initialization
    void Start()
    {
        //impacts = new GameObject[maxImpacts];
        //for(int i = 0; i < maxImpacts; i++){
            //impacts[i] = Instantiate (impactPrefab) as GameObject;
        //}

        anim = GetComponentInChildren<Animator>();
        fx = GameObject.FindObjectOfType<FXManager>();

        if(fx == null)
            Debug.LogError("No FXManager!");
    }
Ejemplo n.º 39
0
 void Awake()
 {
     if(mInst == null) mInst = this;
 }
Ejemplo n.º 40
0
    void Start()
    {
        fxManager = GameObject.FindObjectOfType<FXManager>();

        if(fxManager == null) {
            Debug.LogError("Couldn't find an FXManager.");
        }

        hitmarker = GameObject.Find("Hitmarker");

        if (weaponData == null)
        {
            weaponData = gameObject.GetComponentInChildren<WeaponData>();
            if (weaponData == null)
            {
                Debug.LogError("Did not find any WeaponData in our children!");
                return;
            }
        }
    }
 void Start()
 {
     _instance = this;
 }
Ejemplo n.º 42
0
    void Start()
    {
        this.speed = 0.015f;
        this.canMove = true;
        this.isSit = false;
        gameStart = false;
        this.animator = GetComponent<Animator> ();

        fxManager = GameObject.Find ("FXManager").GetComponent<FXManager> ();
        StartCoroutine (Instructions ());
        StartCoroutine (GameStart ());
    }
Ejemplo n.º 43
0
 void Start() {
     Debug.Log("start GunController");
     fxManager = FXManager.instance;
     cam = gameObject.transform.FindChild("PlayerCamera").gameObject;
 }
    void Start()
    {
        anim = GetComponent<Animator> ();
        fxManager = GameObject.FindObjectOfType<FXManager> ();

        if (fxManager == null) {
            Debug.LogError ("Couldn't find an FXManager");
        }
    }
Ejemplo n.º 45
0
    protected void Awake()
    {
        controller = this.GetComponent<CharacterController2D>();
        myPhotonView = this.GetComponent<PhotonView>();
        myHealth = this.GetComponent<Health>();

        moveState = moveStates.secondJump;
        fxManager = GameObject.FindObjectOfType<FXManager>();

        if(fxManager)
        {
            fxManagerPhotonView = fxManager.GetComponent<PhotonView>();
        }

        netMan = GameObject.FindObjectOfType<MovementTestingNetMan>();
        netManPhotonView = netMan.GetComponent<PhotonView>();
    }
Ejemplo n.º 46
0
	private void Initialize()
	{
		

		Inst = this;

		//Initializing CsDebug
		CsDebug debug = GetComponent<CsDebug>();
		debug.Initialize();

		//Initializing DBManager
		DBManager = new DBManager();
		DBManager.Initialize();

		//Initializing Event Manager
		EventManager = new EventManager();
		EventManager.Initialize();

		ItemManager = new ItemManager();
		ItemManager.Initialize();

		//Initializing NPC Manager
		NPCManager = new NPCManager();
		NPCManager.Initialize();



		PlayerControl = new PlayerControl();
		PlayerControl.Initialize();



		UIManager = new UIManager();
		UIManager.Initialize();


		MutantCharacter mutant1 = GameObject.Find("MutantCharacter").GetComponent<MutantCharacter>();
		mutant1.Initialize();
		mutant1.MyStatus.MaxHealth = 200;
		mutant1.MyStatus.Health = 200;
		mutant1.MyAI.BlackBoard.PatrolLoc = new Vector3(70, 0, -54);
		mutant1.MyAI.BlackBoard.PatrolRange = new Vector3(10, 5, 10);
		mutant1.MyAI.BlackBoard.CombatRange = new Vector3(20, 5, 20);
		mutant1.MyAI.BlackBoard.HasPatrolInfo = true;




		//HumanCharacter enemy1 = GameObject.Find("HumanCharacter2").GetComponent<HumanCharacter>();
		HumanCharacter enemy2 = GameObject.Find("HumanCharacter4").GetComponent<HumanCharacter>();
		//HumanCharacter enemy3 = GameObject.Find("HumanCharacter5").GetComponent<HumanCharacter>();
		//HumanCharacter enemy4 = GameObject.Find("HumanCharacter6").GetComponent<HumanCharacter>();

		AISquad enemySquad = new AISquad();
		//enemySquad.Members.Add(enemy1);
		enemySquad.Members.Add(enemy2);
		//enemySquad.Members.Add(enemy3);
		//enemySquad.Members.Add(enemy4);

		/*
		enemy1.Initialize();
		enemy1.MyAI.Squad = enemySquad;
		ItemManager.LoadNPCInventory(enemy1.Inventory);
		enemy1.MyAI.WeaponSystem.LoadWeaponsFromInventory();
		*/
		enemy2.Initialize();
		enemy2.MyAI.Squad = enemySquad;
		ItemManager.LoadNPCInventory(enemy2.Inventory);
		enemy2.MyAI.WeaponSystem.LoadWeaponsFromInventory();

		/*
		enemy3.Initialize();
		enemy3.MyAI.Squad = enemySquad;
		ItemManager.LoadNPCInventory(enemy3.Inventory);
		enemy3.MyAI.WeaponSystem.LoadWeaponsFromInventory();


		enemy4.Initialize();
		enemy4.MyAI.Squad = enemySquad;
		ItemManager.LoadNPCInventory(enemy4.Inventory);
		enemy4.MyAI.WeaponSystem.LoadWeaponsFromInventory();
		*/

		//enemy1.MyStatus.MaxHealth = 160;
		//enemy1.MyStatus.Health = 160;
		enemy2.MyStatus.MaxHealth = 100;
		enemy2.MyStatus.Health = 100;

		/*
		enemy3.MyStatus.MaxHealth = 80;
		enemy3.MyStatus.Health = 80;

		enemy4.MyStatus.MaxHealth = 100;
		enemy4.MyStatus.Health = 100;
		*/
		enemySquad.IssueSquadCommand();


		CameraController = GameObject.Find("CameraController").GetComponent<CameraController>();
		CameraController.Initialize();

		CameraShaker = CameraController.GetComponent<CameraShaker>();
		CameraShaker.Initialize();

		FXManager = new FXManager();
		FXManager.Initialize(50);

		AIScheduler = new AIScheduler();
		AIScheduler.Initialize();



		CursorManager = new CursorManager();
		CursorManager.Initialize();

		StartCoroutine(DoPerSecond());
		StartCoroutine(DoPerHalfSecond());
	}
Ejemplo n.º 47
0
 // Use this for initialization
 void Start() {
     fxManager = FXManager.instance;
     Debug.Log("start GunController");
 }
	void Awake ()
    {
	    Instance = this;
	}
Ejemplo n.º 49
0
 void Start()
 {
     this.target = this.gameObject;
     this.fxManager = GameObject.Find ("FXManager").GetComponent<FXManager> ();
     this.Request ();
 }
Ejemplo n.º 50
0
 void Start() {
     fxManager = FXManager.instance;
 }
Ejemplo n.º 51
0
    void Start()
    {
        fxManager = GameObject.FindObjectOfType<FXManager>();

        if (fxManager != null) {
            fxManagerPV = fxManager.GetComponent<PhotonView>();
        }

        if (fxManager == null) {
            Debug.LogError("could not find a FXManager");
        }

        wd = gameObject.GetComponentInChildren<WeaponData>();
        if (wd == null) {
            Debug.LogError("could not find WeaponData component!");
        }
    }