Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        ardController = GetComponent <ard>();
        if (!isMenu)
        {
            objs = new GameObject[] { GameObject.Find("HP1"), GameObject.Find("HP2"), GameObject.Find("HP3"), GameObject.Find("HP4"), GameObject.Find("HP5") };

            HPpos = new Vector3[] { objs[0].transform.localPosition, objs[1].transform.localPosition, objs[2].transform.localPosition, objs[3].transform.localPosition, objs[4].transform.localPosition };

            foreach (GameObject o in objs)
            {
                o.transform.localPosition = new Vector3(-1, -1, -1);
            }
        }
        m = Camera.main;
        r = GetComponent <Rigidbody>();
        c = GetComponent <CapsuleCollider>();

        HP = 5;

        if (!isMenu)
        {
            jumptex   = GameObject.Find("JumpMSG").GetComponent <TextureMan>();
            crouchtex = GameObject.Find("CrouchMSG").GetComponent <TextureMan>();
        }
    }
Esempio n. 2
0
        public static Image Add(Image.Name name, Texture.Name texture, Azul.Rect poRect)
        {
            Image   image    = (Image)instance.AddToFront();
            Texture pTexture = TextureMan.Find(texture);

            image.Initialize(name, pTexture, poRect);
            return(image);
        }
Esempio n. 3
0
        public override void LoadContent()
        {
            //---------------------------------------------------------------------------------------------------------
            // Setup Managers - once here
            //---------------------------------------------------------------------------------------------------------
            TimerMan.Create(3, 1);
            TextureMan.Create(1, 1);
            TextureMan.Add(Texture.Name.Aliens, "Aliens.tga");
            TextureMan.Add(Texture.Name.Birds, "Birds_N_Shield.tga");
            TextureMan.Add(Texture.Name.Birds2, "Birds_N_Shield.tga");

            //---------------------------------------------------------------------------------------------------------
            // Sounds
            //---------------------------------------------------------------------------------------------------------
            SoundMan.Create();
            SoundMan.Add(Sound.Name.Explode, "explosion.wav");
            SoundMan.Add(Sound.Name.Shoot, "shoot.wav");
            SoundMan.Add(Sound.Name.Invader1, "fastinvader1.wav");
            SoundMan.Add(Sound.Name.Invader2, "fastinvader2.wav");
            SoundMan.Add(Sound.Name.Invader3, "fastinvader3.wav");
            SoundMan.Add(Sound.Name.Invader4, "fastinvader4.wav");
            SoundMan.Add(Sound.Name.InvaderKilled, "invaderkilled.wav");
            SoundMan.Add(Sound.Name.UFOLow, "ufo_lowpitch.wav");
            SoundMan.Add(Sound.Name.UFOHigh, "ufo_highpitch.wav");

            ImageMan.Create(5, 2);
            ImageMan.Add(Image.Name.Default, Texture.Name.Aliens, new Azul.Rect(0, 0, 0, 0));
            ImageMan.Add(Image.Name.NullObject, Texture.Name.Aliens, new Azul.Rect(0, 0, 0, 0));

            GameSpriteMan.Create(25, 5);
            BoxSpriteMan.Create(25, 5);

            SpriteBatchMan.Create(5, 2);

            ProxySpriteMan.Create(10, 1);
            GameObjectMan.Create(50, 5);
            ColPairMan.Create(25, 5);
            GlyphMan.Create(5, 2);
            FontMan.Create(5, 2);
            ShipMan.Create();

            PlayerMan.Create();
            SceneContext.Create();
        }
Esempio n. 4
0
 public Image() : base()
 {
     poRect   = null;
     pTexture = TextureMan.Find(Texture.Name.Default);
 }