private Entity MakeThug() { float y = (float)((r.NextDouble()) * ScreenHelper.Viewport.Height); Sprite s = new Sprite(new Vector2(ScreenHelper.Viewport.Width, y), medFish, AnimationType.None); Entity e = new TargetedEnemy(2, "Damage", s, 2, 400, manager.Get("Player")); e.OnDeath += new Action1(SpawnBlood); e.OnDeath += new Action1(SpawnCoin); return(e); }
void Awake() { //Find and allocate the referenced objects and scripts in the scene _muzzleFlash = gameObject.GetComponentInChildren <MuzzleFlash>(); _midPoint = GameObject.Find("MidPoint"); _anim = gameObject.GetComponent <Animator>(); _agent = gameObject.GetComponent <NavMeshAgent>(); _obstacle = gameObject.GetComponent <NavMeshObstacle>(); _combatUI = GameObject.Find("_combatMan").GetComponent <CombatUI>(); _calcDam = GameObject.Find("_combatMan").GetComponent <CalculateDamage>(); _targetedEnemy = GameObject.Find("_combatMan").GetComponent <TargetedEnemy>(); _moveIndicator = GameObject.Find("Player").GetComponent <MoveIndicator>(); _playerTurnUI = GameObject.Find("PlayerTurn"); _cam = GameObject.Find("_cameraParent").GetComponent <CameraController>(); _combatOver = GameObject.Find("EndCanvas").GetComponent <CombatOver>(); _aux = GameObject.Find("_combatMan").GetComponent <AuxilliaryPower>(); //Determine player stats based off _ap = _CombatManager._maxAP; _combatUI.Initialize(); //Prepare the elements used for navigation _mask = ~_mask; _path = new NavMeshPath(); _aux.Initialize(); }