Exemplo n.º 1
0
        private void SendSpawnSphereCommand()
        {
            var randomPosition = new Vector3 {
                x = Random.Range(-50f, 50f),
                y = Random.Range(0.5f, 5f),
                z = Random.Range(-50f, 50f)
            };

            var q = new Quaternion();
            var sphereTemplate = EntityTemplates.CreateSphereTemplate(q, randomPosition);

            worldCommandSender.SendCreateEntityCommand(new WorldCommands.CreateEntity.Request(sphereTemplate));
        }
Exemplo n.º 2
0
        // Now takes an optional rotation argument.
        private static void AddSphere(Snapshot snapshot, Vector3 position, Quaternion rotation)
        {
            var template = EntityTemplates.CreateSphereTemplate(rotation, position);

            snapshot.AddEntity(template);
        }