예제 #1
0
    public void SetPlaneKey(string imageKey)
    {
        Transform transform = base.transform.FindChild("NamePlane");

        if (transform != null)
        {
            SimpleSprite component = transform.GetComponent <SimpleSprite>();
            if (component != null)
            {
                float     num        = 1.5f;
                float     num2       = 8f;
                Transform transform2 = base.transform.FindChild("NameText");
                if (transform2 != null)
                {
                    SpriteText component2 = transform2.GetComponent <SpriteText>();
                    if (component2)
                    {
                        float num3 = Math.Abs(component2.BottomRight.x - component2.TopLeft.x);
                        float num4 = Math.Abs(component2.BottomRight.y - component2.TopLeft.y);
                        component.Setup(num3 + num2 * 2f, num4 * num, imageKey);
                        component.Hide(false);
                        return;
                    }
                }
                component.Hide(true);
            }
        }
    }
예제 #2
0
    public void SetPlaneKey(string imageKey, ref float addY)
    {
        Transform transform = base.transform.FindChild("ChatPlane");

        if (transform != null)
        {
            SimpleSprite component = transform.GetComponent <SimpleSprite>();
            if (component != null)
            {
                Transform transform2 = base.transform.FindChild("ChatText");
                if (transform2 != null)
                {
                    UIListItemContainer component2 = transform2.GetComponent <UIListItemContainer>();
                    if (null != component2)
                    {
                        Vector2 vector = (Vector2)component2.Data;
                        float   num    = vector.x + 20f;
                        float   h      = vector.y + 10f;
                        component.Setup(num, h, imageKey);
                        component.SetColor(new Color(1f, 1f, 1f, 0.8f));
                        component.transform.rotation       = base.transform.rotation;
                        component.transform.localScale     = new Vector3(this.fBackImageScaleX, this.fBackImageScaleY, 1f);
                        component2.transform.localPosition = new Vector3(-(num * this.fEmoticonScale) / 2f + 20f * this.fEmoticonScale / 2f, vector.y * this.fEmoticonScale / 2f, 0f);
                    }
                }
                else
                {
                    component.Hide(true);
                }
            }
        }
    }
예제 #3
0
	public void ShowResultMessage(QuestResult _result)
	{
        // play sound effect
        PlayResultSound(_result);

        HideAll();
        if (dicSimpleSprite.ContainsKey(_result))
        {
            nowSpite = dicSimpleSprite[_result];
            nowSpite.Start();
            fPassedTime = 0.0f;
            bShow = true;
            nowSpite.Hide(false);
        }
	}
예제 #4
0
 private void Start()
 {
     alert.Hide(true);
     buttonAction.SetInputDelegate(Catch);
 }
예제 #5
0
 private void Update()
 {
     progressbar.Value = plant.CurrentLife;
     alert.Hide(plant.Life > plant.MinLife);
 }