public Zapper CreateZapperAt(Vector3 position) { Zapper zapper = Zapper.Instantiate(this.zapperPrefab); zapper.transform.position = position; return(zapper); }
public Zapper CreateZapperAt(Vector3 position) { Zapper zapper = Zapper.Instantiate(zapperPrefab); zapper.transform.position = position; zapper.gameObject.SetActive(true); return(zapper); }
/// <summary> /// Initialize and clear the memory /// </summary> private void InitializeMemory() { Ram = new byte[0x800]; Map = new Map(this, _engine); SRam = new byte[0x2000]; Zapper = new Zapper(_engine); Debug.WriteLine(this, "Memory initialized ok.", DebugStatus.Cool); }
protected override void Initialize() { repository = new DbSetRepository(new DbContextProvider(() => new SampleMappingContext())); var z = new Zapper(repository); z.Zap(); this.party1 = ObjectMother.Create <Party>(); this.party2 = ObjectMother.Create <Party>(); repository.Add(this.party1); repository.Add(this.party2); repository.Flush(); }
public Zapper ConfigureZapper(MouseState mouseState) { Zapper zapper = new Zapper(); zapper.Trigger = () => { return(mouseState.LeftButtonPressed); }; zapper.LightSense = () => { return(mouseState.SensePixel); }; return(zapper); }
public void OnEnterCamera() { int qt = Random.Range(0, zapperPlaceHolders.Length) + 1; for (int i = 0; i < qt; i++) { ZapperPlaceHolder placeholder = zapperPlaceHolders [Random.Range(0, zapperPlaceHolders.Length)]; if (!placeholder.used) { placeholder.used = true; Zapper newZapper = ZapperManager.GetInstance().CreateZapperAt(placeholder.transform.position); this.zappers.Add(newZapper); } } }
private void CreateZapper() { int zapperCount = Random.Range(0, (this.zapperPlaceHolders.Length + 1)); this.cont++; for (int i = 0; i < zapperCount; i++) { int zapperIndex = Random.Range(0, this.zapperPlaceHolders.Length); ZapperPlaceHolder placeHolder = this.zapperPlaceHolders [zapperIndex]; if (!placeHolder.wasUsed) { placeHolder.wasUsed = true; Vector3 placeHolderPosition = placeHolder.transform.position; Zapper newZapper = ZapperManager.GetIntance().CreateZapperAt(placeHolderPosition); zappers.Add(newZapper); //newZapper.transform.SetParent (this.transform, false); } } }
public void MakeRoot(Zapper _zap) { isRoot = true; SetRoot(_zap); SetupLine(_zap.gameObject); }
public void SetRoot(Zapper _zap) { root = _zap; }
public void SetParent(ZapNode _node) { parent = _node; SetupLine(_node.gameObject); root = parent.root; }
public static bool RemoveZap(Zapper _zap) { return(zaps.Remove(_zap)); }
public static void RegisterZap(Zapper _zap) { zaps.Add(_zap); _zap.id = nextZapperID++; }