//------------------------------------------------------------------------------- /// //------------------------------------------------------------------------------- public new void Init() { base.Init(); //Appel a la main des scripts du gameObject m_spriteSheet.Init(); m_ConeVision.Init(); //m_spriteSheet.SetAnimation(m_AnimRepos); m_CercleDiscretion.Init(this); game.getSoundEngine().setSwitch("Sol", "Metal02", m_GameObject); }
public override void Init() { base.Init(); //m_GameObject = obj; m_ScriptMachine = m_GameObject.GetComponent <CScriptMachine>(); m_ScriptMachine.SetMachine(this); m_ActiveZone = m_GameObject.transform.GetComponentInChildren <CMachineActiveZone>(); m_ActiveZone.Init(this); m_SpriteSheet = new CSpriteSheet(m_GameObject); m_SpriteSheet.Init(); m_SpriteSheet.SetAnimation(m_ScriptMachine.GetAnimation()); }
//------------------------------------------------------------------------------- /// Unity //------------------------------------------------------------------------------- void Start() { game = GameObject.Find("_Game").GetComponent <CGame>(); m_spriteSheet = new CSpriteSheet(gameObject); m_spriteSheet.Init(); m_openAnimation = new CAnimation(m_openMat, 4, 1, 2.0f); m_spriteSheet.SetAnimation(m_openAnimation); m_spriteSheet.setEndCondition(CSpriteSheet.EEndCondition.e_PingPong); m_objCamera = GameObject.Find("Cameras"); m_bGoodWay = true; m_enter_att = new GameObject(); m_exit_att = new GameObject(); m_enter_att.transform.parent = m_exit_att.transform.parent = gameObject.transform; m_enter_att.transform.position = m_exit_att.transform.position = transform.position; m_enter_att.transform.rotation = m_exit_att.transform.rotation = transform.rotation; m_exit_att.transform.Rotate(0, 0, 180); m_enter_att.AddComponent <CPorteAttenuation>().Init(m_PieceExit, m_PieceEnter, attenuation_enter_size); m_exit_att.AddComponent <CPorteAttenuation>().Init(m_PieceEnter, m_PieceExit, attenuation_exit_size); }