本文整理汇总了C#中LevelManager类的典型用法代码示例。如果您正苦于以下问题:C# LevelManager类的具体用法?C# LevelManager怎么用?C# LevelManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LevelManager类属于命名空间,在下文中一共展示了LevelManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 ();
}
示例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);
}
}
}
示例3: Start
// Use this for initialization
void Start () {
Debug.Log("Player Spawned");
SpawnPlayer();
levelManager = FindObjectOfType<LevelManager>();
lives = 3;
}
示例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;
}
}
示例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;
}
}
示例6: Start
// Use this for initialization
void Start()
{
Config config = GetComponent<Config>();
m_levelManager = GetComponent<LevelManager>();
m_scoreTable = config.ScoreTable;
m_scoreMultipliers = config.ScoreMultipliers;
}
示例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>();
}
示例8: Start
// Use this for initialization
void Start ()
{
isBreakable = (this.tag == "Breakable");
if (isBreakable)
numberOfBricks++;
levelManager = GameObject.FindObjectOfType<LevelManager> ();
}
示例9: Start
void Start()
{
manager = GameObject.FindObjectOfType<LevelManager>();
Vector3 scale = gameObject.transform.localScale;
scale.x = 0;
gameObject.transform.localScale = scale;
}
示例10: Start
void Start()
{
timer = GetComponent<Slider> ();
levelManager = GameObject.FindObjectOfType<LevelManager> ();
winLabel = GameObject.Find ("Survived");
winLabel.SetActive (false);
}
示例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);
}
示例12: Start
void Start()
{
levelManager = GameObject.FindObjectOfType<LevelManager>();
ball = GameObject.FindObjectOfType<Ball>();
textLife = GameObject.FindObjectOfType<Text>();
paddle = GameObject.FindObjectOfType<Paddle>();
}
示例13: Start
// Use this for initialization
void Start()
{
//Filter load private resources
levelmanager = GameObject.FindObjectOfType<LevelManager> ();
timesHit = 0;
}
示例14: Start
// Use this for initialization
void Start()
{
text = GetComponent<Text> ();
playerHealth = maxPlayerHealth;
levelManager = FindObjectOfType<LevelManager> ();
isDead = false;
}
示例15: Start
void Start()
{
levelManager = FindObjectOfType<LevelManager>();
animator = GetComponentInChildren<Animator>();
transform = gameObject.transform;
speed = Random.Range(levelManager.Speed + 2, maxSpeed);
}