本文整理汇总了C#中LevelManager类的典型用法代码示例。如果您正苦于以下问题:C# LevelManager类的具体用法?C# LevelManager怎么用?C# LevelManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LevelManager类属于命名空间,在下文中一共展示了LevelManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Start
void Start()
{
audio_source = GetComponent<AudioSource> ();
if (new_level) {
SelectMusic ();
new_level = false;
}
levelManager = GameObject.Find ("LevelLogic").GetComponent<LevelManager> ();
enemyManager = GameObject.Find ("LevelLogic").GetComponent<EnemyManager> ();
playerManager = GameObject.Find ("LevelLogic").GetComponent<PlayerManager> ();
//Form level
levelManager.InitLevelMap ();
//Update Each Tile in map - includeds asigning values through CA
levelManager.UpdateGapsAndPlatforms ();
levelManager.UpdateLevelMap ();
//Draw level
levelMap = levelManager.GetLevelMap ();
levelManager.DrawLevelMap ();
//Get level map tile array
//levelMap = levelManager.GetLevelMap ();
enemyManager.LoadMap (levelMap);
playerManager.LoadMap (levelMap);
//Player must be loaded after level for raycasting to work
playerManager.LoadPlayerSpawn ();
playerManager.LoadEndPoint ();
enemyManager.LoadEnemySpawns ();
}
开发者ID:mduffyg13,项目名称:Honours-Project,代码行数:34,代码来源:LevelLogic.cs
示例2: Awake
void Awake()
{
levelManager = LevelManager.levelManager;
myTransform = transform;
initialPosition = myTransform.localPosition;
// Si on ne veut pas de la liste classique, on doit renseigner ceux que l'on veut ainsi que les poids associés
if (specificPickup.Length > 0) {
for (int i = 0; i < specificPickup.Length; i++) {
// Si le pickup n'est pas activé, on passe au suivant
if (!IsPickupActivated (specificPickup [i]))
continue;
listeBonus.Add (specificPickup[i]);
int currentWeight = 0;
// Si l'on ne veut pas les poids standards, on doit les changer également (il doit aussi y en avoir 1 pour 1 pickup)
if (specificPickup.Length == specificWeight.Length) {
currentWeight = specificWeight [i];
} else {
currentWeight = specificPickup [i].weight;
}
weightBonus.Add (currentWeight);
}
} else {
for (int i = 0; i < ListManager.current.powerups.Length; i++) {
// Si le pickup n'est pas activé, on passe au suivant
if (!IsPickupActivated (ListManager.current.powerups[i]))
continue;
listeBonus.Add (ListManager.current.powerups[i]);
weightBonus.Add (ListManager.current.powerups[i].weight);
}
}
}
开发者ID:lpointet,项目名称:runblobby,代码行数:35,代码来源:PickupSpawn.cs
示例3: Start
// Use this for initialization
void Start () {
Debug.Log("Player Spawned");
SpawnPlayer();
levelManager = FindObjectOfType<LevelManager>();
lives = 3;
}
开发者ID:ocoulson,项目名称:UnityTuts,代码行数:8,代码来源:PlayerSpawner.cs
示例4: Start
// Use this for initialization
void Start()
{
player = GameObject.FindGameObjectWithTag("Player");
LM = (LevelManager)FindObjectOfType(typeof(LevelManager));
Debug.Log("Starting #" + nHumans);
myTransform = transform;
spriteObj = GetComponent<exSprite>();
spriteAnimation = GetComponent<exSpriteAnimation>();
// Determine if I should be an alien.
if (nAliens < maxAliens) {
float pAlien = 0;
if (nHumans >= nHandlers - maxAliens) {
pAlien = 1;
}
else {
pAlien = Random.Range(0, nHandlers);
}
if (pAlien <= 1 || nHumans >= nHandlers ) {
Debug.Log("Human "+ nHumans + " Is an ALIEN!");
isAlien = true;
nAliens++;
nHumans++;
}
else {
Debug.Log("Human "+ nHumans + " Is a HUMAN!");
nHumans++;
}
}
//EventManager.instance.AddListener(this, "Oso_clicked");
if (isAlien) {
audio.pitch = 1.75f;
}
}
开发者ID:lucascaro,项目名称:InspectorHeartbeat,代码行数:35,代码来源:ClickHandler.cs
示例5: Start
void Start()
{
Screen.showCursor = false;
manager = (GameObject.Find("LevelManager").GetComponent("LevelManager")) as LevelManager;
player_sound_manager = (GameObject.Find("MainPlayer").GetComponent("PlayerSoundManager")) as PlayerSoundManager;
current_level = Application.loadedLevel;
player = GameObject.Find("MainPlayer");
player.transform.position = start_pos.transform.position;
fade_in.FadeIn();
player.tag = "Player";
CharacterMotor motor = LevelManager.player.GetComponent("CharacterMotor") as CharacterMotor;
if(current_level == 3 && !boosted)
{
boosted = true;
motor.movement.maxForwardSpeed += 0.5f;
motor.movement.maxBackwardsSpeed += 0.5f;
motor.movement.maxSidewaysSpeed += 0.5f;
motor.jumping.baseHeight += 0.02f;
motor.jumping.extraHeight += 0.02f;
default_speed = motor.movement.maxForwardSpeed;
default_jump = motor.jumping.baseHeight;
}
else if(current_level == 3)
{
motor.movement.maxForwardSpeed = default_speed;
motor.movement.maxBackwardsSpeed = default_speed;
motor.movement.maxSidewaysSpeed = default_speed;
motor.jumping.baseHeight = default_jump;
motor.jumping.extraHeight = default_jump;
}
}
开发者ID:jackykschou,项目名称:ECHO_scripts,代码行数:32,代码来源:LevelManager.cs
示例6: Start
// Use this for initialization
void Start()
{
Config config = GetComponent<Config>();
m_levelManager = GetComponent<LevelManager>();
m_scoreTable = config.ScoreTable;
m_scoreMultipliers = config.ScoreMultipliers;
}
开发者ID:nigamshah,项目名称:spaceshooter,代码行数:8,代码来源:ScoreCalculator.cs
示例7: Start
void Start()
{
leftmost = (Camera.main.ViewportToWorldPoint(new Vector2(0,0)) + new Vector3(this.GetComponent<SpriteRenderer>().sprite.bounds.size.x / 2 + buffer, 0, 0));
rightmost = (Camera.main.ViewportToWorldPoint(new Vector2(1,0)) - new Vector3(this.GetComponent<SpriteRenderer>().sprite.bounds.size.x / 2 + buffer, 0, 0));
hpBar = GameObject.Find("HealthBar").GetComponent<Image>();
levelManager = GameObject.FindObjectOfType<LevelManager>();
}
开发者ID:FlorinVasileNechita,项目名称:UnityCourseLaserDefender,代码行数:7,代码来源:PlayerController.cs
示例8: Start
// Use this for initialization
void Start ()
{
isBreakable = (this.tag == "Breakable");
if (isBreakable)
numberOfBricks++;
levelManager = GameObject.FindObjectOfType<LevelManager> ();
}
开发者ID:moisesejimenezg,项目名称:BlockBreaker,代码行数:8,代码来源:Brick.cs
示例9: Start
void Start()
{
manager = GameObject.FindObjectOfType<LevelManager>();
Vector3 scale = gameObject.transform.localScale;
scale.x = 0;
gameObject.transform.localScale = scale;
}
开发者ID:ocoulson,项目名称:MScProjectUnity,代码行数:7,代码来源:LoadingBar.cs
示例10: Start
void Start()
{
timer = GetComponent<Slider> ();
levelManager = GameObject.FindObjectOfType<LevelManager> ();
winLabel = GameObject.Find ("Survived");
winLabel.SetActive (false);
}
开发者ID:FlorinVasileNechita,项目名称:LaneDefender,代码行数:7,代码来源:GameTimer.cs
示例11: Start
public void Start()
{
manager = GameObject.Find("Manager").GetComponent<LevelManager>();
player = GameObject.Find("Player").GetComponent<Player>();
initialPosition = new Vector3(7.5f,0.73f,-8.9f);
player.SetPosition(initialPosition);
player.SetRotation(new Quaternion(0f,0f,0f,0));
gameOver = false;
xLimit1 = -10.8f;
xLimit2 = 8f;
yLimit1 = 0.3f;
yLimit2 = 4f;
zLimit1 = -9.5f;
zLimit2 = 9.5f;
radiusFood = 0.5f;
counter = 0f;
previousCounter = 0f;
foodObjects = new string[]{"FoodApple","FoodBanana","FoodCandyCane"};
timerLimit = 2.0f;
timer = timerLimit;
player.SetActive(true);
CreateFoodObjects(foodQty);
}
开发者ID:ThaisCorreia,项目名称:Unity-Game_CollectFood,代码行数:32,代码来源:GameManager.cs
示例12: Start
void Start()
{
levelManager = GameObject.FindObjectOfType<LevelManager>();
ball = GameObject.FindObjectOfType<Ball>();
textLife = GameObject.FindObjectOfType<Text>();
paddle = GameObject.FindObjectOfType<Paddle>();
}
开发者ID:Qhoros,项目名称:Unity,代码行数:7,代码来源:LoseCollider.cs
示例13: Start
// Use this for initialization
void Start()
{
//Filter load private resources
levelmanager = GameObject.FindObjectOfType<LevelManager> ();
timesHit = 0;
}
开发者ID:onyxhat,项目名称:Unity_Course,代码行数:8,代码来源:Brick.cs
示例14: Start
// Use this for initialization
void Start()
{
text = GetComponent<Text> ();
playerHealth = maxPlayerHealth;
levelManager = FindObjectOfType<LevelManager> ();
isDead = false;
}
开发者ID:jkien,项目名称:PlatformerTutorial,代码行数:8,代码来源:HealthManager.cs
示例15: Start
void Start()
{
levelManager = FindObjectOfType<LevelManager>();
animator = GetComponentInChildren<Animator>();
transform = gameObject.transform;
speed = Random.Range(levelManager.Speed + 2, maxSpeed);
}
开发者ID:urgamedev,项目名称:BrainCodeMobi,代码行数:7,代码来源:RocketController.cs
示例16: Awake
void Awake()
{
levelManager = FindObjectOfType<LevelManager>();
scoreManager = FindObjectOfType<ScoreManager>();
ballController = FindObjectOfType<BallController>();
anim = GetComponent<Animator>();
}
开发者ID:klassifyed,项目名称:BlockBreaker,代码行数:7,代码来源:LoseCollider.cs
示例17: Setup
// Use this for initialization
public void Setup(LevelManager _lm)
{
name = "UI";
_levman = _lm;
transform.position = new Vector3(Camera.main.transform.position.x, Camera.main.transform.position.y, -100f);
GameEventManager.GameStart += GameStart;
GameEventManager.GameOver += GameOver;
GameEventManager.Respawn += Respawn;
_IngameUI = FETool.findWithinChildren(this.gameObject, "Ingame").GetComponent<IngameUI>();
_GameOverUI = FETool.findWithinChildren(this.gameObject, "GameOver").GetComponent<GameOverUI>();
_EntryUI = FETool.findWithinChildren(this.gameObject, "EntryMenu").GetComponent<EntryUI>();
_EndGameUI = FETool.findWithinChildren(this.gameObject, "EndGame").GetComponent<EndGameUI>();
BottomPos = FETool.findWithinChildren(gameObject, "BottomPos").transform;
TopPos = FETool.findWithinChildren(gameObject, "TopPos").transform;
_IngameUI.SetupSub(this);
_IngameUI.Setup();
_GameOverUI.SetupSub(this);
_GameOverUI.Setup();
_EntryUI.SetupSub(this);
_EntryUI.Setup();
_EndGameUI.SetupSub(this);
_EndGameUI.Setup();
if (_lm._profile.SETUP.GameType == GameSetup.versionType.Demo)
{
_IngameUI.initPos = IngamePlaceDemo;
_GameOverUI.lbInitpos = LeaderboardPlaceDemo;
_EndGameUI.lbInitpos = LeaderboardPlaceDemo;
}
}
开发者ID:Tavrox,项目名称:Lavapools,代码行数:34,代码来源:MainMenu.cs
示例18: Start
// Use this for initialization
void Start()
{
currentTime = initTime;
timeText = this.GetComponent<Text>();
levelManager = GameObject.Find("LevelMan").GetComponent<LevelManager>();
printTime((int)currentTime);
}
开发者ID:win2k-yuki,项目名称:MedalPusher,代码行数:8,代码来源:TimeScript.cs
示例19: Setup
public void Setup(LevelManager _lev)
{
_spr = FETool.findWithinChildren(gameObject, "TheGate").GetComponentInChildren<OTSprite>();
_levMan = _lev;
GameEventManager.Respawn += Respawn;
GameEventManager.GameOver += GameOver;
firstStep = FETool.findWithinChildren(gameObject, "ExitLoc/1");
secondStep = FETool.findWithinChildren(gameObject, "ExitLoc/2");
thirdStep = FETool.findWithinChildren(gameObject, "ExitLoc/3");
spriteFirstStep = firstStep.GetComponentsInChildren<OTSprite>();
spriteSecondStep = secondStep.GetComponentsInChildren<OTSprite>();
spriteThirdStep = thirdStep.GetComponentsInChildren<OTSprite>();
fadeSprites(spriteFirstStep, 0f);
fadeSprites(spriteSecondStep, 0f);
fadeSprites(spriteThirdStep, 0f);
for (int i = 0 ; i < 24 ; i++)
{
slotList.Add(FETool.findWithinChildren(gameObject, "Slots/" + (i+1).ToString()));
}
defaultSlot = FETool.findWithinChildren(gameObject, "Slots/Default");
Vortex = FETool.findWithinChildren(gameObject, "Vortex").GetComponentInChildren<OTAnimatingSprite>();
}
开发者ID:Tavrox,项目名称:Lavapools,代码行数:27,代码来源:SpaceGate.cs
示例20: Start
// Use this for initialization
void Start()
{
levelManager = GameObject.Find("LevelManager").GetComponent<LevelManager>();
transform.position = transform.position.normalized*levelManager.worldRadius;
nextSpawnRemainingTime = UnityEngine.Random.Range(2.0f, 5.0f);
}
开发者ID:sergilazaro,项目名称:canniballism,代码行数:8,代码来源:EnemySpawnZone.cs
注:本文中的LevelManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论