public void Start() { Game.OnGameStart += () => DisableUI(); voisin = GetComponent <Voisin>() as Voisin; herd = HerdList.Instance.NewHerd(this); endangeredVisuals_TR = endangeredVisuals.transform; endangeredVisuals_TR.SetParent(transform.parent); }
// Use this for initialization void Start() { gs = GetComponent <GridSubscriber>() as GridSubscriber; myself = GetComponent <Voisin>(); rb = GetComponent <Rigidbody2D>() as Rigidbody2D; tr = GetComponent <Transform>() as Transform; //if(m_PoidWandering > 0) // InvokeRepeating("WanderF", 1.0f, m_WanderRefresh); WanderF(); }
static void Main(string[] args) { //Instanciation des classes Observable observable = new Observable(); Observer observer = new Observer(); //Abonnement a l'événement observable.MonEvenement += observer.Ecouter; //Déclenchement de la méthode observable.Declenchement(); Console.WriteLine(); Radio r = new Radio("Marcel"); Voisin v = new Voisin(); r.AllumerRadio += v.FrapperAuMur; r.Allumage(); Console.ReadKey(); }