Exemple #1
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));
    }
Exemple #2
0
 void Awake()
 {
     player      = GetComponent <PhysicsController>();
     cc          = GetComponent <CharController>();
     loopTracker = GetComponent <LoopTracker>();
     cannon      = GetComponent <CannonLookAtMouse>();
 }
Exemple #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));
    }
Exemple #4
0
    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;
    }
Exemple #5
0
 void Awake()
 {
     loopTracker = GetComponent <LoopTracker>();
     cannon      = GetComponent <CannonLookAtMouse>();
 }
Exemple #6
0
 void Awake()
 {
     camera      = Camera.main;
     loopTracker = GetComponent <LoopTracker>();
 }
Exemple #7
0
 public void SetUp()
 {
     factory = new MockFactory();
     sounds  = factory.CreateMock <MockSounds>();
     tracker = new LoopTracker(sounds.MockObject);
 }
 public void SetUp()
 {
     factory = new MockFactory();
     sounds = factory.CreateMock<MockSounds>();
     tracker = new LoopTracker(sounds.MockObject);
 }
Exemple #9
0
 public SceneManager(LoopTracker loopTracker, MessagePromptCoordinator messagePromptCoordinator)
 {
     this.loopTracker = loopTracker;
     this.messagePromptCoordinator = messagePromptCoordinator;
 }
Exemple #10
0
 public SceneManager(LoopTracker loopTracker, MessagePromptCoordinator messagePromptCoordinator) : this(null, loopTracker, messagePromptCoordinator)
 {
 }
 public SceneManager(LoopTracker loopTracker, MessagePromptCoordinator messagePromptCoordinator)
     : this(null, loopTracker, messagePromptCoordinator)
 {
 }