Ejemplo n.º 1
0
        public void LoadBumperCars()
        {
            GameObject asset = LoadAsset("BumperCars");

            BumperCars.BumperCars bumperCars = asset.AddComponent <BumperCars.BumperCars>();

            SetColors(asset, new[]
            {
                ConvertColor(161, 1, 1),
                ConvertColor(220, 205, 7),
                ConvertColor(112, 112, 112),
                ConvertColor(76, 76, 76)
            });

            BasicFlatRideSettings(bumperCars, "Dodgems", 600, .75f, .3f, .1f, 6, 6);
            SetWaypoints(asset);
            asset.transform.position = new Vector3(0, 999, 0);

            BuildableObject buildableObject = asset.GetComponent <BuildableObject>();

            buildableObject.dontSerialize = true;
            buildableObject.isPreview     = true;

            AssetManager.Instance.registerObject(asset.GetComponent <FlatRide>());
        }
Ejemplo n.º 2
0
        void Awake()
        {
            _bumperCars = GetComponentInParent <BumperCars>();

            _physicsCar = new GameObject();
            _physicsCar.AddComponent <BumperCarAi>();
            _physicsCar.GetComponent <BumperCarAi>().BumperCars = _bumperCars;
            _physicsCar.transform.position = transform.position;
            _physicsCar.transform.rotation = transform.rotation;
        }
Ejemplo n.º 3
0
        void Awake()
        {
            _bumperCars = GetComponentInParent<BumperCars>();

            _physicsCar = new GameObject();
            _physicsCar.AddComponent<BumperCarAi>();
            _physicsCar.GetComponent<BumperCarAi>().BumperCars = _bumperCars;
            _physicsCar.transform.position = transform.position;
            _physicsCar.transform.rotation = transform.rotation;
        }