Inheritance: MonoBehaviour
コード例 #1
0
    public void AddListenerOnButton()
    {
        MenuPause menuInGame = transform.parent.GetComponent <MenuPause>();

        items.onClick.AddListener(delegate { menuInGame.Inventory.DisplayInventory(player); });
        magic.onClick.AddListener(delegate { menuInGame.MagicInterface.DisplayInterface(); });
    }
コード例 #2
0
        private void Initialize()
        {
            this.Active = true;

            this.Inventory       = new Inventory();
            this.MouseController = new MouseController();

            this.MenuPause = new MenuPause();
        }
コード例 #3
0
 void Start()
 {
     currentLevel = 0;
     pm           = gameObject.GetComponent <PlayerMovement>();
     pd           = gameObject.GetComponent <ProcessData>();
     logWritter   = gameObject.GetComponent <LogWritter>();
     playerStats  = gameObject.GetComponent <PlayerStats>();
     TMPro.TextMeshProUGUI text = GameObject.Find("Canvas").GetComponentInChildren <TMPro.TextMeshProUGUI>();
     timer = text.GetComponent <Timer>();
     mp    = gameObject.GetComponent <MenuPause>();
 }
コード例 #4
0
    // Use this for initialization
    void Start()
    {
        sauvegardetest   = player.GetComponent <SauvegardeTest> ();
        menupausescript  = player.GetComponent <MenuPause> ();
        movecamerascript = lacamera.GetComponent <MoveCameraNEW> ();
        rbplayer         = player.GetComponent <Rigidbody2D> ();
        srplayer         = player.GetComponent <SpriteRenderer> ();
        srplayercheat    = playerCheat.GetComponent <SpriteRenderer> ();

        srplayer.enabled = false;

        StartCoroutine(StartDelay());

        //anim = countdown.GetComponent<Animator> ();
    }
コード例 #5
0
        /// <inheritdoc />
        /// <summary>
        ///     Создаёт экземпляр окна, по переданной игре
        /// </summary>
        /// <param name="game"></param>
        public Window(IGame game)
        {
            _game = game;

            Width  = 1000;
            Height = 500;

            CoordSheet = new CoordinateSheet(Width, Height);

            pict   = new Bitmap(Width, Height);
            drawer = Graphics.FromImage(pict);
            drawer.InterpolationMode = InterpolationMode.NearestNeighbor;
            drawer.PixelOffsetMode   = PixelOffsetMode.Half;

            screen = new PictureBox
            {
                Width  = Width,
                Height = Height,
                Left   = 0,
                Top    = 0
            };
            Controls.Add(screen);

            KeyDown          += OnKeyDown;
            KeyUp            += OnKeyUp;
            SizeChanged      += OnSizeChanged;
            screen.MouseMove += OnMouseMove;

            pause          = new MenuPause(this);
            ChangeControls = new MenuChangeControls(this);
            gameOver       = new MenuGameOver(this);

            _gameoverTool.LocationChanged += (o, e) => RealGameOver();
            Controls.Add(_gameoverTool);

            _timer          = new Timer(20);
            _timer.Elapsed += (o, e) =>
            {
                foreach (var texture in _textures)
                {
                    texture.Value.Tick(20 * 0.001);
                }
            };
            _timer.Elapsed += Draw;
            _timer.Start();

            MouseWheel += (o, e) => ChangeScale(e.Delta < 0 ? 0.9 : 10.0 / 9);
        }
コード例 #6
0
    // Use this for initialization
    void Start()
    {
        rbpiegon              = GetComponent <Rigidbody2D> ();
        anim                  = GetComponent <Animator> ();
        movecameranewscript   = laCamera.GetComponent <MoveCameraNEW> ();
        powerupscriptpremier  = powerup1.GetComponent <PowerUp> ();
        powerupscriptdeuxieme = powerup2.GetComponent <PowerUp> ();
        spriterendererplayer  = GetComponent <SpriteRenderer> ();
        lemenupause           = GetComponent <MenuPause> ();
        colliderplayer        = GetComponent <Collider2D> ();

        animPlume3      = plume3.GetComponent <Animator> ();
        animPlume2      = plume2.GetComponent <Animator> ();
        animPlume1      = plume1.GetComponent <Animator> ();
        animMiniBeakyUI = miniBeakyUI.GetComponent <Animator> ();

        animPlume3.SetBool("Move", true);

        lemenupause.enabled = true;

        countCollectible = 0;

        totalCollectible = ZPlayerPrefs.GetInt("Total", 0);

        highScoreLevelTest = ZPlayerPrefs.GetInt("HighScoreLTest", 0);

        //totaletoilew1l1 = ZPlayerPrefs.GetInt ("EtoileW1L1", 0);

        highScoreEtoileW1L1 = ZPlayerPrefs.GetInt("HSEtoileW1L1", 0);

        highScoreEtoileW1L2 = ZPlayerPrefs.GetInt("HSEtoileW1L2", 0);

        nbVie = 3;

        ayoye = false;
    }
コード例 #7
0
 void Start()
 {
     speechManager = GameObject.FindWithTag("kinect-speech").GetComponent<SpeechManager>();
     intManager = GameObject.FindWithTag("kinect-interaction").GetComponent<InteractionManager>();
     pMenu = GetComponent<MenuPause>();
     opMenu = GetComponent<MenuOptions>();
 }
コード例 #8
0
 private void Awake()
 {
     rb           = GetComponent <Rigidbody>();
     SoundManager = GameObject.Find("SFManager").gameObject.transform.GetComponent <SFManager>();
     PausedData   = GameObject.Find("MenuPause").GetComponent <MenuPause>();
 }
コード例 #9
0
 private void Awake()
 {
     handlerInstance = this;
 }
コード例 #10
0
 void Start()
 {
     lemenupause  = player.GetComponent <MenuPause> ();
     playerscript = player.GetComponent <SauvegardeTest> ();
 }
コード例 #11
0
ファイル: Destroy.cs プロジェクト: Envywolf23/iHo_Project
 // Use this for initialization
 void Start()
 {
     puntos           = GameObject.FindObjectOfType <Score>();
     Pausa            = GameObject.FindObjectOfType <MenuPause>();
     reproductorAudio = GameObject.FindObjectOfType <AudioReproductor>();
 }
コード例 #12
0
    void Start()
    {
        this._decal = (GameObject)Resources.Load ("Shots/Decal");
        this._cameraBullet = transform.FindChild("CameraBullet").gameObject;
        this._cameraMain = GameObject.FindGameObjectWithTag("MainCamera");
        this._menuPause = this._cameraMain.GetComponent<MenuPause>();
        this._sparks = GetComponentInChildren<ParticleEmitter>();
        this._player = GameObject.FindGameObjectWithTag("Player");
        this._velocity = 15f;
        this._timeToDestroy = 15f;

        StartCoroutine(this.DestroyByTime());
    }
コード例 #13
0
    void Start()
    {
        speechManager = GameObject.FindWithTag("kinect-speech").GetComponent<SpeechManager>();
        worldIndex = GameObject.Find("levelProperties").GetComponent<LevelProperties>().worldIndex;
        intManager = GameObject.FindWithTag("kinect-interaction").GetComponent<InteractionManager>();

        pMenu = GetComponent<MenuPause>();
        opMenu = GetComponent<MenuOptions>();
        hMenu = GetComponent<MenuHelp>();
    }