Пример #1
0
 public void Start()
 {
     _spriteEvilTexture  = GameObject.Find("EvilObjectEarth").GetComponent <SpriteRenderer>();
     _spriteEarthTexture = EarthObject.GetComponent <SpriteRenderer>();
     _evilRectSize       = new Point((int)EvilObjectTexture.rect.height, (int)EvilObjectTexture.rect.width);
     _earthRectSize      = new Point((int)EarthObjectTexture.rect.height, (int)EarthObjectTexture.rect.width);
     _move2Script        = GameObject.Find("EvilObjectEarth").GetComponent <move1>();
 }
Пример #2
0
        public virtual GameObject Version(int round)
        {
            GameObject UFO1;
            Vector3    UFO1Pos = new Vector3(x, 0, 0);

            UFO1      = Object.Instantiate(Resources.Load("UFO4", typeof(GameObject)), UFO1Pos, Quaternion.identity) as GameObject;
            UFO1.name = "UFO4";
            UFO1.AddComponent <PickupObject>();
            //UFO1.AddComponent<Rigidbody>();
            move1 test = UFO1.AddComponent <move1>();

            test.speedX *= (float)round;
            test.speedY *= (float)round;
            test.speedZ  = 0.0f;
            return(UFO1);
        }