Skip to content

Instantly share code, notes, and snippets.

@dogles
Created December 18, 2014 21:03
Show Gist options
  • Save dogles/507a3be60f47a76616ec to your computer and use it in GitHub Desktop.
Save dogles/507a3be60f47a76616ec to your computer and use it in GitHub Desktop.
Fucking FTUE
if ( !m_allUnitsPlaced ){
if ( m_combatGameMode.hud.unitBeingDragged == null && !m_combatGameMode.hordeSpawned ) {
m_combatGameMode.hud.hideSkillSlots();
m_combatGameMode.hud.showSlot(0, false);
m_combatGameMode.hud.showSlot(1, false);
m_combatGameMode.hud.showSlot(2, false);
m_combatGameMode.hud.showSlot(3, false);
m_combatGameMode.hud.setActiveTopHUD(false);
m_combatGameMode.hud.showSlotArrows(true);
NGUITools.SetActive(m_combatGameMode.hud.gameObject, true);
showMapTooltips(true);
} else if ( m_combatGameMode.hud.unitBeingDragged != null && m_combatGameMode.hordeSpawned && !m_brutePlaced) {
if ( m_horde.length > 0 ) {
m_tooltipTargets = [getDroneInPosition(Front, Northeast)];
m_combatGameMode.hud.showSlotTooltip(0,false);
m_tooltipType = TapToMutate;
showMapTooltips(true);
m_combatGameMode.cameraManager.setFocus( Vec2D.weak(m_tooltipTargets[0].position.x, m_tooltipTargets[0].position.y), 120);
}
} else if (m_combatGameMode.hud.unitBeingDragged == null && m_combatGameMode.hordeSpawned ) {
if (m_horde.length < 15) {
if (m_wallHit && !m_brutePlaced) {
m_tooltipTargets = m_combatGameMode.gameMap.objectsInAllCollisionGroups(["zombie", "spawner"]);
m_tooltipType = SpawnAllDronesArrow;
m_combatGameMode.pauseMobs(true);
m_combatGameMode.cameraManager.setFocus( Vec2D.weak(m_tooltipTargets[0].position.x, m_tooltipTargets[0].position.y), 240);
showMapTooltips(true);
} else if (!m_wallHit) {
m_tooltipType = SpawnAllDrones;
showMapTooltips(true);
}
} else if (m_wallHit && !m_unitHit && !m_brutePlaced ) {
if ( m_horde.length > 0 ) {
var droneTarget = getDroneInPosition(Front, Northeast);
m_combatGameMode.cameraManager.setFocus( Vec2D.weak(droneTarget.position.x, droneTarget.position.y), 280);
}
m_combatGameMode.pauseMobs(true);
m_combatGameMode.hud.showSlot(0, true);
m_combatGameMode.hud.showSlotTooltip(0, true, Locale.template.ftue_unit_description_brute);
showMapTooltips(false);
m_uiTooltipShowing = true;
} else if ( m_wallHit && m_unitHit && m_brutePlaced && !m_spitterPlaced ) {
m_combatGameMode.pauseMobs(true);
m_combatGameMode.hud.showSlot(2, true);
m_combatGameMode.hud.showSlotTooltip(2, true, Locale.template.ftue_unit_description_spitter);
var firefighter = m_combatGameMode.gameMap.objectsInAllCollisionGroups(["human", "mob", "tutorial"]);
if (firefighter.length > 0) {
m_combatGameMode.cameraManager.setFocus( Vec2D.weak(firefighter[0].position.x, firefighter[0].position.y), 300);
}
showMapTooltips(false);
m_uiTooltipShowing = true;
} else if ( m_unitHit && m_enemyKilled ) {
if (!m_brutePlaced2) {
m_combatGameMode.hud.showSlot(1, true);
m_combatGameMode.hud.showSlotTooltip(1, true, Locale.template.ftue_unit_description_brute);
m_combatGameMode.pauseMobs(true);
} else if (!m_allUnitsPlaced) {
m_combatGameMode.hud.showSlot(3, true);
m_combatGameMode.hud.showSlotTooltip(3, true, Locale.template.ftue_unit_description_spitter);
}
}
} else if ( m_combatGameMode.hud.unitBeingDragged != null && m_combatGameMode.hordeSpawned && m_brutePlaced && !m_spitterPlaced) {
if ( m_horde.length > 0 ) {
m_tooltipTargets = [getDroneInPosition(Back, Northeast)];
m_combatGameMode.hud.showSlotTooltip(2,false);
m_tooltipType = TapToMutate;
showMapTooltips(true);
}
AND ON AND ON AND ON AND ON AND ON AND ON
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment