Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Just added google play services. Just for when I fuck up I can revert
  • Loading branch information
ZsemberiDaniel committed Feb 24, 2017
1 parent e1382f4 commit 7a7daa9
Show file tree
Hide file tree
Showing 489 changed files with 37,883 additions and 72 deletions.
8 changes: 6 additions & 2 deletions Assets/FirstGameManager.cs
Expand Up @@ -6,6 +6,8 @@

public class FirstGameManager : MonoBehaviour {

private CanvasScaler canvasScaler;

public RectTransform scoringRect;
public GameObject backButton;
public Image clickImge;
Expand Down Expand Up @@ -37,6 +39,8 @@ public class FirstGameManager : MonoBehaviour {
gameLogic = GetComponent<AITTTGameLogic>();
aiScript = GetComponent<AIScript>();

canvasScaler = GameObject.Find("Canvas").GetComponent<CanvasScaler>();

Color htc = helpText.color; htc.a = 0; helpText.color = htc;

// change think time of ai to a bit more
Expand Down Expand Up @@ -148,11 +152,11 @@ public class FirstGameManager : MonoBehaviour {
break;
case 13: // Give move abilities

Vector2 clickimgPos = new Vector2(-Camera.main.pixelWidth * 0.25f, -Camera.main.pixelHeight / 2 * 0.7f);
Vector2 clickimgPos = new Vector2(-canvasScaler.referenceResolution.x * 0.25f, -canvasScaler.referenceResolution.y / 2 * 0.7f);
DOTween.Sequence()
.Append(clickImge.rectTransform.DOLocalMove(clickimgPos, 0f))
.Append(clickImge.DOFade(1f, 0.2f))
.Append(clickImge.rectTransform.DOLocalMoveX(Camera.main.pixelWidth * 0.25f, 1.4f))
.Append(clickImge.rectTransform.DOLocalMoveX(canvasScaler.referenceResolution.x * 0.25f, 1.4f))
.Append(clickImge.DOFade(0f, 0.2f))
.SetLoops(2, LoopType.Restart);

Expand Down
30 changes: 30 additions & 0 deletions Assets/GPGSIds.cs
@@ -0,0 +1,30 @@
// <copyright file="GPGSIds.cs" company="Google Inc.">
// Copyright (C) 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>

///
/// This file is automatically generated DO NOT EDIT!
///
/// These are the constants defined in the Play Games Console for Game Services
/// Resources.
///


public static class GPGSIds
{
public const string event_first_game = "CgkIu5mLkuoXEAIQAQ"; // <GPGSID>

}

12 changes: 12 additions & 0 deletions Assets/GPGSIds.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Assets/GooglePlayGames.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Assets/GooglePlayGames/BasicApi.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

269 changes: 269 additions & 0 deletions Assets/GooglePlayGames/BasicApi/Achievement.cs
@@ -0,0 +1,269 @@
// <copyright file="Achievement.cs" company="Google Inc.">
// Copyright (C) 2014 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi
{
using System;

/// <summary>Data interface for retrieving achievement information.</summary>
/// <remarks>
/// There are 3 states an achievement can be in:
/// <para>
/// Hidden - indicating the name and description of the achievement is
/// not visible to the player.
/// </para><para>
/// Revealed - indicating the name and description of the achievement is
/// visible to the player.
/// Unlocked - indicating the player has unlocked, or achieved, the achievment.
/// </para><para>
/// Achievements has two types, standard which is unlocked in one step,
/// and incremental, which require multiple steps to unlock.
/// </para>
/// </remarks>
public class Achievement
{
static readonly DateTime UnixEpoch =
new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);

private string mId = string.Empty;
private bool mIsIncremental = false;
private bool mIsRevealed = false;
private bool mIsUnlocked = false;
private int mCurrentSteps = 0;
private int mTotalSteps = 0;
private string mDescription = string.Empty;
private string mName = string.Empty;
private long mLastModifiedTime = 0;
private ulong mPoints;
private string mRevealedImageUrl;
private string mUnlockedImageUrl;

/// <summary>
/// Returns a <see cref="System.String"/> that represents the current <see cref="GooglePlayGames.BasicApi.Achievement"/>.
/// </summary>
/// <returns>A <see cref="System.String"/> that represents the current <see cref="GooglePlayGames.BasicApi.Achievement"/>.</returns>
public override string ToString()
{
return string.Format(
"[Achievement] id={0}, name={1}, desc={2}, type={3}, revealed={4}, unlocked={5}, steps={6}/{7}",
mId, mName, mDescription, mIsIncremental ? "INCREMENTAL" : "STANDARD",
mIsRevealed, mIsUnlocked, mCurrentSteps, mTotalSteps);
}

public Achievement()
{
}

/// <summary>
/// Indicates whether this achievement is incremental.
/// </summary>
public bool IsIncremental
{
get
{
return mIsIncremental;
}

set
{
mIsIncremental = value;
}
}

/// <summary>
/// The number of steps the user has gone towards unlocking this achievement.
/// </summary>
public int CurrentSteps
{
get
{
return mCurrentSteps;
}

set
{
mCurrentSteps = value;
}
}

/// <summary>
/// The total number of steps needed to unlock this achievement.
/// </summary>
public int TotalSteps
{
get
{
return mTotalSteps;
}

set
{
mTotalSteps = value;
}
}

/// <summary>
/// Indicates whether the achievement is unlocked or not.
/// </summary>
public bool IsUnlocked
{
get
{
return mIsUnlocked;
}

set
{
mIsUnlocked = value;
}
}

/// <summary>
/// Indicates whether the achievement is revealed or not (hidden).
/// </summary>
public bool IsRevealed
{
get
{
return mIsRevealed;
}

set
{
mIsRevealed = value;
}
}

/// <summary>
/// The ID string of this achievement.
/// </summary>
public string Id
{
get
{
return mId;
}

set
{
mId = value;
}
}

/// <summary>
/// The description of this achievement.
/// </summary>
public string Description
{
get
{
return this.mDescription;
}

set
{
mDescription = value;
}
}

/// <summary>
/// The name of this achievement.
/// </summary>
public string Name
{
get
{
return this.mName;
}

set
{
mName = value;
}
}

/// <summary>
/// The date and time the state of the achievement was modified.
/// </summary>
/// <remarks>
/// The value is invalid (-1 long) if the achievement state has
/// never been updated.
/// </remarks>
public DateTime LastModifiedTime
{
get
{
return UnixEpoch.AddMilliseconds(mLastModifiedTime);
}

set
{
TimeSpan ts = value - UnixEpoch;
mLastModifiedTime = (long)ts.TotalMilliseconds;
}
}

/// <summary>
/// The number of experience points earned for unlocking this Achievement.
/// </summary>
public ulong Points
{
get
{
return mPoints;
}

set
{
mPoints = value;
}
}

/// <summary>
/// The URL to the image to display when the achievement is revealed.
/// </summary>
public string RevealedImageUrl
{
get
{
return mRevealedImageUrl;
}

set
{
mRevealedImageUrl = value;
}
}

/// <summary>
/// The URL to the image to display when the achievement is unlocked.
/// </summary>
public string UnlockedImageUrl
{
get
{
return mUnlockedImageUrl;
}

set
{
mUnlockedImageUrl = value;
}
}
}
}
#endif
12 changes: 12 additions & 0 deletions Assets/GooglePlayGames/BasicApi/Achievement.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a7daa9

Please sign in to comment.