コード例 #1
0
    // Use this for initialization
    void Start()
    {
        hardwareButtonHandler = this.GetComponentInChildren <HardwareButtonsHandler>();
        hardwareButtonHandler.AddEventListener(this.gameObject);
        exitButtonsContainer = this.transform.Find("ExitButtonsContainer");

        fadingBackground = exitButtonsContainer.transform.Find("Background").GetComponent <Fading2D>();
        originalColor    = fadingBackground.GetComponent <SpriteRenderer>().color;

        exitButtonsContainer.GetComponentInChildren <YesButton>().AddEventListener(this.gameObject);
        exitButtonsContainer.GetComponentInChildren <NoButton>().AddEventListener(this.gameObject);
        exitButtonsContainer.active = false;
    }
コード例 #2
0
    public virtual void OnStart()
    {
        originalColor = spriteToUse.color;
        fadeComponent = this.GetComponent <Fading2D>();
        fadeComponent.SetTarget(spriteToUse);
        fadeComponent.AddEventListener(this.gameObject);

        if (!isInitialized)
        {
            clouds        = new List <Cloud>(this.GetComponentsInChildren <Cloud>());
            isInitialized = true;
        }

        Before();
    }
コード例 #3
0
    protected override void Initialize()
    {
        if (!isInitialized)
        {
            this.spriteRenderer = this.GetComponent <SpriteRenderer>();
            this.goalPosition   = goalTransform.localPosition;
            MoveToGoal();
            fadeComponent = this.GetComponent <Fading2D>();
            if (this.spriteRenderer)
            {
                cloudOriginalColor = this.spriteRenderer.color;
            }

            isInitialized = true;
        }
    }
コード例 #4
0
ファイル: FadingTest.cs プロジェクト: duckbridge/15-min-max
 // Use this for initialization
 void Start()
 {
     fading2D = this.GetComponent <Fading2D>();
     fading2D.FadeInto(targetColor, 50f);
 }