コード例 #1
0
ファイル: Layout.cs プロジェクト: absurdhero/tmotmo-full
    void Start()
    {
        // Stop reorientation weirdness
        // http://answers.unity3d.com/questions/14655/unity-iphone-black-rect-when-i-turn-the-iphone
        Screen.autorotateToPortrait = false;
        Screen.autorotateToPortraitUpsideDown = false;
        Screen.autorotateToLandscapeRight = false;
        Screen.autorotateToLandscapeLeft = false;

        sounds = new Sounds(gameObject);
        sounds.Start();

        var loopTracker = new LoopTracker(sounds);

        var textLabel = new GameObject("prompt text");
        textLabel.SetActive(false);
        var text = textLabel.AddComponent<GUIText>();
        textLabel.transform.position = new Vector3(0f, 0.06f, -9.5f);
        var font = (Font) Resources.Load("sierra_agi_font/sierra_agi_font", typeof(Font));
        text.font = font;

        messageBox = new MessageBox(font);
        var prompt = new Prompt(textLabel, text).build();

        sceneManager = new SceneManager(loopTracker, new MessagePromptCoordinator(prompt, messageBox));
    }
コード例 #2
0
ファイル: PlayerInput.cs プロジェクト: 2leftfeet/LD47
 void Awake()
 {
     player      = GetComponent <PhysicsController>();
     cc          = GetComponent <CharController>();
     loopTracker = GetComponent <LoopTracker>();
     cannon      = GetComponent <CannonLookAtMouse>();
 }
コード例 #3
0
    void Start()
    {
        // Stop reorientation weirdness
        // http://answers.unity3d.com/questions/14655/unity-iphone-black-rect-when-i-turn-the-iphone
        Screen.autorotateToPortrait           = false;
        Screen.autorotateToPortraitUpsideDown = false;
        Screen.autorotateToLandscapeRight     = false;
        Screen.autorotateToLandscapeLeft      = false;


        sounds = new Sounds(gameObject);
        sounds.Start();

        var loopTracker = new LoopTracker(sounds);


        var textLabel = new GameObject("prompt text");

        textLabel.SetActive(false);
        var text = textLabel.AddComponent <GUIText>();

        textLabel.transform.position = new Vector3(0f, 0.06f, -9.5f);
        var font = (Font)Resources.Load("sierra_agi_font/sierra_agi_font", typeof(Font));

        text.font = font;

        messageBox = new MessageBox(font);
        var prompt = new Prompt(textLabel, text).build();

        sceneManager = new SceneManager(loopTracker, new MessagePromptCoordinator(prompt, messageBox));
    }
コード例 #4
0
ファイル: CharController.cs プロジェクト: 2leftfeet/LD47
    private void Awake()
    {
        source          = GetComponent <AudioSource>();
        loopTracker     = GetComponent <LoopTracker>();
        spriteRenderers = GetComponentsInChildren <SpriteRenderer>();
        animator        = GetComponent <Animator>();
        collider        = GetComponent <Collider2D>();
        pickupObject    = GetComponent <PlayerPickupObject>();
        input           = GetComponent <PlayerInput>();
        cannon          = GetComponent <CannonLookAtMouse>();

        LoopManager.ResetReplay += ResetPlayer;
    }
コード例 #5
0
 void Awake()
 {
     loopTracker = GetComponent <LoopTracker>();
     cannon      = GetComponent <CannonLookAtMouse>();
 }
コード例 #6
0
 void Awake()
 {
     camera      = Camera.main;
     loopTracker = GetComponent <LoopTracker>();
 }
コード例 #7
0
 public void SetUp()
 {
     factory = new MockFactory();
     sounds  = factory.CreateMock <MockSounds>();
     tracker = new LoopTracker(sounds.MockObject);
 }
コード例 #8
0
 public void SetUp()
 {
     factory = new MockFactory();
     sounds = factory.CreateMock<MockSounds>();
     tracker = new LoopTracker(sounds.MockObject);
 }
コード例 #9
0
ファイル: SceneManager.cs プロジェクト: nagyistoce/tmotmo
 public SceneManager(LoopTracker loopTracker, MessagePromptCoordinator messagePromptCoordinator)
 {
     this.loopTracker = loopTracker;
     this.messagePromptCoordinator = messagePromptCoordinator;
 }
コード例 #10
0
 public SceneManager(LoopTracker loopTracker, MessagePromptCoordinator messagePromptCoordinator) : this(null, loopTracker, messagePromptCoordinator)
 {
 }
コード例 #11
0
 public SceneManager(LoopTracker loopTracker, MessagePromptCoordinator messagePromptCoordinator)
     : this(null, loopTracker, messagePromptCoordinator)
 {
 }