protected void SpawnRune(double X, double Y, RuneType type, RuneSize size = RuneSize.Normal) { var rune = new InternalRuneData(type, size, new Frame3D(X, Y, 0)); var id = world.IdGenerator.CreateNewId(rune); var p = rune.Location; world.GetEngine <IPudgeWorldEngine>().SpawnRune(rune.Type, rune.Size, p.X, p.Y, p.Z, id); world.SpawnedRunes.Add(rune); }
public void SpawnRune(RuneType type, RuneSize size, double x, double y, double z, string id) { this.Log("SpawnRune", type, size, x, y, z, id); EnsureRunesAreReady(); var rune = GameObject.Instantiate <GameObject>(runesPrefabs[type]); rune.transform.position = new Vector3((float)x, (float)y, (float)z).ToUnityBasis(); rune.transform.localScale = Vector3.one; rune.transform.localScale *= size == RuneSize.Normal ? 0.02f : 0.025f; rune.name = id; }
public InternalRuneData(RuneType type, RuneSize size, Frame3D location = new Frame3D()) { Type = type; Size = size; Location = location; }
public RuneData(RuneType type, RuneSize size, Point2D location = new Point2D()) { Location = location; Type = type; Size = size; }